Skip to content

Commit

Permalink
[S390] monwriter kzalloc size.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Melissa Howland authored and Martin Schwidefsky committed Oct 11, 2006
1 parent 0898378 commit 715d854
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/s390/char/monwriter.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 715d854

Please sign in to comment.