aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorHorst Hummel <horst.hummel@de.ibm.com>2006-03-24 06:15:24 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-24 10:33:17 -0500
commit554a826e0a29f1a88e5a5332f0718c059885ec17 (patch)
tree3251034cf7373c9d61f7107c1a52c0c9bf8f8afc /drivers/s390
parentd0b2eaa374afd10960a507a3f2ce2f24b85826e4 (diff)
[PATCH] s390: random values in result of BIODASDINFO2
Use kzalloc to get a zeroed buffer for the structure returned to user space by the BIODASDINFO2 ioctl. Not all fields are set up, e.g. the read_devno is missing. Signed-off-by: Horst Hummel <horst.hummel@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/block/dasd_ioctl.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_ioctl.c
index e1dc0ffee027..d0c2d732dcff 100644
--- a/drivers/s390/block/dasd_ioctl.c
+++ b/drivers/s390/block/dasd_ioctl.c
@@ -260,7 +260,7 @@ dasd_ioctl_information(struct dasd_device *device,
260 if (!device->discipline->fill_info) 260 if (!device->discipline->fill_info)
261 return -EINVAL; 261 return -EINVAL;
262 262
263 dasd_info = kmalloc(sizeof(struct dasd_information2_t), GFP_KERNEL); 263 dasd_info = kzalloc(sizeof(struct dasd_information2_t), GFP_KERNEL);
264 if (dasd_info == NULL) 264 if (dasd_info == NULL)
265 return -ENOMEM; 265 return -ENOMEM;
266 266
@@ -303,8 +303,7 @@ dasd_ioctl_information(struct dasd_device *device,
303 memcpy(dasd_info->type, device->discipline->name, 4); 303 memcpy(dasd_info->type, device->discipline->name, 4);
304 else 304 else
305 memcpy(dasd_info->type, "none", 4); 305 memcpy(dasd_info->type, "none", 4);
306 dasd_info->req_queue_len = 0; 306
307 dasd_info->chanq_len = 0;
308 if (device->request_queue->request_fn) { 307 if (device->request_queue->request_fn) {
309 struct list_head *l; 308 struct list_head *l;
310#ifdef DASD_EXTENDED_PROFILING 309#ifdef DASD_EXTENDED_PROFILING