Skip to contentSkip to conversation

Patch "KVM: s390: Fix STHYI buffer alignment for diag224" has been added to the 4.8-stable tree

PATCH [email protected] 1 participant 1 message Nov 8, 2016

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

KVM: s390: Fix STHYI buffer alignment for diag224

to the 4.8-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:

     kvm-s390-fix-sthyi-buffer-alignment-for-diag224.patch

and it can be found in the queue-4.8 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 45c7ee43a5184ddbff652ee0d2e826f86f1b616b Mon Sep 17 00:00:00 2001

From: Janosch Frank <[email protected]>
Date: Wed, 26 Oct 2016 08:48:11 +0200
Subject: KVM: s390: Fix STHYI buffer alignment for diag224

From: Janosch Frank <[email protected]>

commit 45c7ee43a5184ddbff652ee0d2e826f86f1b616b upstream.

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.

---
 arch/s390/kvm/sthyi.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/s390/kvm/sthyi.c +2 -2
@@ -315,7 +315,7 @@ static void fill_diag(struct sthyi_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->par.infpval1 |= PAR_WGHT_VLD;
 
 out:
-	kfree(diag224_buf);
+	free_page((unsigned long)diag224_buf);
 	vfree(diag204_buf);
 }
 

Patches currently in stable-queue which might be from [email protected] are

queue-4.8/kvm-s390-fix-sthyi-buffer-alignment-for-diag224.patch