s390/hypfs: Use get_free_page() instead of kmalloc to ensure page alignment
authorMichael Holzheu <holzheu@linux.vnet.ibm.com>
Tue, 25 Oct 2016 14:24:28 +0000 (16:24 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Nov 2016 09:48:34 +0000 (10:48 +0100)
commit3b21a0b468a3d611b6f7749f61e8cd185ec6df3d
treee729a7af37db4e9de31acfaf1660aad793eb089f
parente835220ed25f6bd1e62fb51e351f5ccc9a157554
s390/hypfs: Use get_free_page() instead of kmalloc to ensure page alignment

commit 237d6e6884136923b6bd26d5141ebe1d065960c9 upstream.

Since commit d86bd1bece6f ("mm/slub: support left redzone") it is no longer
guaranteed that kmalloc(PAGE_SIZE) returns page aligned memory.

After the above commit we get an error for diag224 because aligned
memory is required. This leads to the following user visible error:

 # mount none -t s390_hypfs /sys/hypervisor/
 mount: unknown filesystem type 's390_hypfs'

 # dmesg | grep hypfs
 hypfs.cccfb8: The hardware system does not provide all functions
               required by hypfs
 hypfs.7a79f0: Initialization of hypfs failed with rc=-61

Fix this problem and use get_free_page() instead of kmalloc() to get
correctly aligned memory.

Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/s390/hypfs/hypfs_diag.c