[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>
This commit is contained in:
Родитель
08983787d2
Коммит
715d854bc2
|
@ -110,7 +110,7 @@ static int monwrite_new_hdr(struct mon_private *monpriv)
|
||||||
monbuf = kzalloc(sizeof(struct mon_buf), GFP_KERNEL);
|
monbuf = kzalloc(sizeof(struct mon_buf), GFP_KERNEL);
|
||||||
if (!monbuf)
|
if (!monbuf)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
monbuf->data = kzalloc(monbuf->hdr.datalen,
|
monbuf->data = kzalloc(monhdr->datalen,
|
||||||
GFP_KERNEL | GFP_DMA);
|
GFP_KERNEL | GFP_DMA);
|
||||||
if (!monbuf->data) {
|
if (!monbuf->data) {
|
||||||
kfree(monbuf);
|
kfree(monbuf);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче