lkml.org 
[lkml]   [2018]   [Sep]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 3.16 20/63] scsi: sg: allocate with __GFP_ZERO in sg_build_indirect()
From
> 3.16.58-rc1 review patch.  If anyone has any objections, please let me  
> know.

> ------------------

> From: Alexander Potapenko <glider@google.com>

> commit a45b599ad808c3c982fdcdc12b0b8611c2f92824 upstream.

> This shall help avoid copying uninitialized memory to the userspace when
> calling ioctl(fd, SG_IO) with an empty command.

> Reported-by: syzbot+7d26fc1eea198488deab@syzkaller.appspotmail.com
> Signed-off-by: Alexander Potapenko <glider@google.com>
> Acked-by: Douglas Gilbert <dgilbert@interlog.com>
> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> ---
> drivers/scsi/sg.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

> --- a/drivers/scsi/sg.c
> +++ b/drivers/scsi/sg.c
> @@ -1825,7 +1825,7 @@ retry:
> num = (rem_sz > scatter_elem_sz_prev) ?
> scatter_elem_sz_prev : rem_sz;

> - schp->pages[k] = alloc_pages(gfp_mask, order);
> + schp->pages[k] = alloc_pages(gfp_mask | __GFP_ZERO, order);
> if (!schp->pages[k])
> goto out;



Can't find the corresponding bug.

\
 
 \ /
  Last update: 2018-09-22 02:20    [W:0.143 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site