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

Commit 45c7ee43 authored by Janosch Frank's avatar Janosch Frank Committed by Christian Borntraeger
Browse files

KVM: s390: Fix STHYI buffer alignment for diag224



Diag224 requires a page-aligned 4k buffer to store the name table
into. kmalloc does not guarantee page alignment, hence we replace it
with __get_free_page for the buffer allocation.

Cc: stable@vger.kernel.org # v4.8+
Reported-by: default avatarMichael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: default avatarJanosch Frank <frankja@linux.vnet.ibm.com>
Reviewed-by: default avatarCornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
parent a5efb6b6
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -315,7 +315,7 @@ static void fill_diag(struct sthyi_sctns *sctns)
	if (r < 0)
		goto out;

	diag224_buf = kmalloc(PAGE_SIZE, GFP_KERNEL | GFP_DMA);
	diag224_buf = (void *)__get_free_page(GFP_KERNEL | GFP_DMA);
	if (!diag224_buf || diag224(diag224_buf))
		goto out;

@@ -378,7 +378,7 @@ static void fill_diag(struct sthyi_sctns *sctns)
	sctns->par.infpval1 |= PAR_WGHT_VLD;

out:
	kfree(diag224_buf);
	free_page((unsigned long)diag224_buf);
	vfree(diag204_buf);
}