Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 715d854b authored by Melissa Howland's avatar Melissa Howland Committed by Martin Schwidefsky
Browse files

[S390] monwriter kzalloc size.



Fix length on kzalloc for data buffer so as to not overwrite
unallocated storage.

Signed-off-by: default avatarMelissa Howland <melissah@us.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 08983787
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -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);