aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
Diffstat (limited to 'block')
-rw-r--r--block/scsi_ioctl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c
index a26ba07955fe..71bdf88884b2 100644
--- a/block/scsi_ioctl.c
+++ b/block/scsi_ioctl.c
@@ -436,11 +436,10 @@ int sg_scsi_ioctl(struct file *file, struct request_queue *q,
436 436
437 bytes = max(in_len, out_len); 437 bytes = max(in_len, out_len);
438 if (bytes) { 438 if (bytes) {
439 buffer = kmalloc(bytes, q->bounce_gfp | GFP_USER| __GFP_NOWARN); 439 buffer = kzalloc(bytes, q->bounce_gfp | GFP_USER| __GFP_NOWARN);
440 if (!buffer) 440 if (!buffer)
441 return -ENOMEM; 441 return -ENOMEM;
442 442
443 memset(buffer, 0, bytes);
444 } 443 }
445 444
446 rq = blk_get_request(q, in_len ? WRITE : READ, __GFP_WAIT); 445 rq = blk_get_request(q, in_len ? WRITE : READ, __GFP_WAIT);