Message ID | 1503956111-36652-18-git-send-email-keescook@chromium.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Mon, 2017-08-28 at 14:34 -0700, Kees Cook wrote: > diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c > index f6097b89d5d3..f1c6bd56dd5b 100644 > --- a/drivers/scsi/scsi_lib.c > +++ b/drivers/scsi/scsi_lib.c > @@ -77,14 +77,15 @@ int scsi_init_sense_cache(struct Scsi_Host *shost) > if (shost->unchecked_isa_dma) { > scsi_sense_isadma_cache = > kmem_cache_create("scsi_sense_cache(DMA)", > - SCSI_SENSE_BUFFERSIZE, 0, > - SLAB_HWCACHE_ALIGN | SLAB_CACHE_DMA, NULL); > + SCSI_SENSE_BUFFERSIZE, 0, > + SLAB_HWCACHE_ALIGN | SLAB_CACHE_DMA, NULL); > if (!scsi_sense_isadma_cache) > ret = -ENOMEM; All this part of this patch does is to change source code indentation. Should these changes really be included in this patch? Thanks, Bart.
On Mon, Aug 28, 2017 at 2:42 PM, Bart Van Assche <Bart.VanAssche@wdc.com> wrote: > On Mon, 2017-08-28 at 14:34 -0700, Kees Cook wrote: >> diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c >> index f6097b89d5d3..f1c6bd56dd5b 100644 >> --- a/drivers/scsi/scsi_lib.c >> +++ b/drivers/scsi/scsi_lib.c >> @@ -77,14 +77,15 @@ int scsi_init_sense_cache(struct Scsi_Host *shost) >> if (shost->unchecked_isa_dma) { >> scsi_sense_isadma_cache = >> kmem_cache_create("scsi_sense_cache(DMA)", >> - SCSI_SENSE_BUFFERSIZE, 0, >> - SLAB_HWCACHE_ALIGN | SLAB_CACHE_DMA, NULL); >> + SCSI_SENSE_BUFFERSIZE, 0, >> + SLAB_HWCACHE_ALIGN | SLAB_CACHE_DMA, NULL); >> if (!scsi_sense_isadma_cache) >> ret = -ENOMEM; > > All this part of this patch does is to change source code indentation. Should > these changes really be included in this patch? I can certainly drop that hunk, but the existing alignment is really ugly. :) Happy to do whatever. -Kees
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index f6097b89d5d3..f1c6bd56dd5b 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -77,14 +77,15 @@ int scsi_init_sense_cache(struct Scsi_Host *shost) if (shost->unchecked_isa_dma) { scsi_sense_isadma_cache = kmem_cache_create("scsi_sense_cache(DMA)", - SCSI_SENSE_BUFFERSIZE, 0, - SLAB_HWCACHE_ALIGN | SLAB_CACHE_DMA, NULL); + SCSI_SENSE_BUFFERSIZE, 0, + SLAB_HWCACHE_ALIGN | SLAB_CACHE_DMA, NULL); if (!scsi_sense_isadma_cache) ret = -ENOMEM; } else { scsi_sense_cache = - kmem_cache_create("scsi_sense_cache", - SCSI_SENSE_BUFFERSIZE, 0, SLAB_HWCACHE_ALIGN, NULL); + kmem_cache_create_usercopy("scsi_sense_cache", + SCSI_SENSE_BUFFERSIZE, 0, SLAB_HWCACHE_ALIGN, + 0, SCSI_SENSE_BUFFERSIZE, NULL); if (!scsi_sense_cache) ret = -ENOMEM; }