提交 715d854b 编写于 作者: M Melissa Howland 提交者: Martin Schwidefsky

[S390] monwriter kzalloc size.

Fix length on kzalloc for data buffer so as to not overwrite
unallocated storage.
Signed-off-by: NMelissa Howland <melissah@us.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 08983787
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册