summaryrefslogtreecommitdiff
path: root/drivers/s390/char/monwriter.c
diff options
context:
space:
mode:
authorMelissa Howland <melissah@us.ibm.com>2006-10-11 17:31:34 +0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2006-10-11 17:31:34 +0400
commit715d854bc215bbcca35097176d674c3ac58a085c (patch)
tree3240ff6a457871f2ef12cb46c04d782bfb184c82 /drivers/s390/char/monwriter.c
parent08983787d2ccab64cb790965ba89621d96cc22c1 (diff)
downloadlinux-715d854bc215bbcca35097176d674c3ac58a085c.tar.xz
[S390] monwriter kzalloc size.
Fix length on kzalloc for data buffer so as to not overwrite unallocated storage. Signed-off-by: Melissa Howland <melissah@us.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/char/monwriter.c')
-rw-r--r--drivers/s390/char/monwriter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/s390/char/monwriter.c b/drivers/s390/char/monwriter.c
index 4362ff260244..abd02ed501cb 100644
--- a/drivers/s390/char/monwriter.c
+++ b/drivers/s390/char/monwriter.c
@@ -110,7 +110,7 @@ static int monwrite_new_hdr(struct mon_private *monpriv)
monbuf = kzalloc(sizeof(struct mon_buf), GFP_KERNEL);
if (!monbuf)
return -ENOMEM;
- monbuf->data = kzalloc(monbuf->hdr.datalen,
+ monbuf->data = kzalloc(monhdr->datalen,
GFP_KERNEL | GFP_DMA);
if (!monbuf->data) {
kfree(monbuf);