aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMelissa Howland <melissah@us.ibm.com>2006-10-11 09:31:34 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2006-10-11 09:31:34 -0400
commit715d854bc215bbcca35097176d674c3ac58a085c (patch)
tree3240ff6a457871f2ef12cb46c04d782bfb184c82
parent08983787d2ccab64cb790965ba89621d96cc22c1 (diff)
[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>
-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)
110 monbuf = kzalloc(sizeof(struct mon_buf), GFP_KERNEL); 110 monbuf = kzalloc(sizeof(struct mon_buf), GFP_KERNEL);
111 if (!monbuf) 111 if (!monbuf)
112 return -ENOMEM; 112 return -ENOMEM;
113 monbuf->data = kzalloc(monbuf->hdr.datalen, 113 monbuf->data = kzalloc(monhdr->datalen,
114 GFP_KERNEL | GFP_DMA); 114 GFP_KERNEL | GFP_DMA);
115 if (!monbuf->data) { 115 if (!monbuf->data) {
116 kfree(monbuf); 116 kfree(monbuf);