* [patch 15/24] s390: random values in result of BIODASDINFO2.
@ 2006-03-22 15:23 Martin Schwidefsky
0 siblings, 0 replies; only message in thread
From: Martin Schwidefsky @ 2006-03-22 15:23 UTC (permalink / raw)
To: akpm, horst.hummel, linux-kernel
From: Horst Hummel <horst.hummel@de.ibm.com>
[patch 15/24] 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>
---
drivers/s390/block/dasd_ioctl.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff -urpN linux-2.6/drivers/s390/block/dasd_ioctl.c linux-2.6-patched/drivers/s390/block/dasd_ioctl.c
--- linux-2.6/drivers/s390/block/dasd_ioctl.c 2006-03-22 14:36:24.000000000 +0100
+++ linux-2.6-patched/drivers/s390/block/dasd_ioctl.c 2006-03-22 14:36:27.000000000 +0100
@@ -260,7 +260,7 @@ dasd_ioctl_information(struct dasd_devic
if (!device->discipline->fill_info)
return -EINVAL;
- dasd_info = kmalloc(sizeof(struct dasd_information2_t), GFP_KERNEL);
+ dasd_info = kzalloc(sizeof(struct dasd_information2_t), GFP_KERNEL);
if (dasd_info == NULL)
return -ENOMEM;
@@ -303,8 +303,7 @@ dasd_ioctl_information(struct dasd_devic
memcpy(dasd_info->type, device->discipline->name, 4);
else
memcpy(dasd_info->type, "none", 4);
- dasd_info->req_queue_len = 0;
- dasd_info->chanq_len = 0;
+
if (device->request_queue->request_fn) {
struct list_head *l;
#ifdef DASD_EXTENDED_PROFILING
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-03-22 15:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-22 15:23 [patch 15/24] s390: random values in result of BIODASDINFO2 Martin Schwidefsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®