lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sat, 03 Nov 2012 17:36:40 +0100 From: Bart Van Assche <bvanassche@....org> To: Jeff Moyer <jmoyer@...hat.com> CC: linux-kernel@...r.kernel.org, linux-scsi@...r.kernel.org, "James E.J. Bottomley" <JBottomley@...allels.com> Subject: Re: [patch,v2 04/10] scsi: allocate scsi_cmnd-s from the device's local numa node On 11/02/12 22:45, Jeff Moyer wrote: > diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c > index 2936b44..4db6973 100644 > --- a/drivers/scsi/scsi.c > +++ b/drivers/scsi/scsi.c > @@ -173,16 +173,20 @@ static DEFINE_MUTEX(host_cmd_pool_mutex); > * NULL on failure > */ > static struct scsi_cmnd * > -scsi_pool_alloc_command(struct scsi_host_cmd_pool *pool, gfp_t gfp_mask) > +scsi_pool_alloc_command(struct scsi_host_cmd_pool *pool, gfp_t gfp_mask, > + int node) > { > struct scsi_cmnd *cmd; > > - cmd = kmem_cache_zalloc(pool->cmd_slab, gfp_mask | pool->gfp_mask); > + cmd = kmem_cache_alloc_node(pool->cmd_slab, > + gfp_mask | pool->gfp_mask | __GFP_ZERO, > + node); > if (!cmd) > return NULL; > > - cmd->sense_buffer = kmem_cache_alloc(pool->sense_slab, > - gfp_mask | pool->gfp_mask); > + cmd->sense_buffer = kmem_cache_alloc_node(pool->sense_slab, > + gfp_mask | pool->gfp_mask | __GFP_ZERO, > + node); It's not clear to me why __GFP_ZERO is added to the allocation flags ? Bart. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists