]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 28 Oct 2016 08:08:58 +0000 (10:08 +0200)
commitbcc3d01a4dec3178f85cd0ab5923cf2f4721cc64
treea2c705310b6f4a6f0e92457ae4a9e82f4510c77d
parentfe4c068b8ccf6938bea41fc7189a735f3147ce02
s390/hypfs: Use get_free_page() instead of kmalloc to ensure page alignment

Since commit 7620af0a712f ("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.

Cc: stable@vger.kernel.org # v3.6+
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/hypfs/hypfs_diag.c