summaryrefslogtreecommitdiff
path: root/arch/x86
diff options
context:
space:
mode:
authorNico Pache <npache@redhat.com>2024-01-19 16:14:29 +0300
committerSasha Levin <sashal@kernel.org>2024-03-15 17:48:18 +0300
commitc9c3cc6a13bddc76bb533ad8147a5528cac5ba5a (patch)
treee840cfc42f9a2d2688d63adde760946d10b7695a /arch/x86
parent1dee72c02170a446d72df8ddec8c3b6936f9f3e8 (diff)
downloadlinux-c9c3cc6a13bddc76bb533ad8147a5528cac5ba5a.tar.xz
selftests: mm: fix map_hugetlb failure on 64K page size systems
[ Upstream commit 91b80cc5b39f00399e8e2d17527cad2c7fa535e2 ] On systems with 64k page size and 512M huge page sizes, the allocation and test succeeds but errors out at the munmap. As the comment states, munmap will failure if its not HUGEPAGE aligned. This is due to the length of the mapping being 1/2 the size of the hugepage causing the munmap to not be hugepage aligned. Fix this by making the mapping length the full hugepage if the hugepage is larger than the length of the mapping. Link: https://lkml.kernel.org/r/20240119131429.172448-1-npache@redhat.com Signed-off-by: Nico Pache <npache@redhat.com> Cc: Donet Tom <donettom@linux.vnet.ibm.com> Cc: Shuah Khan <shuah@kernel.org> Cc: Christophe Leroy <christophe.leroy@c-s.fr> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch/x86')
0 files changed, 0 insertions, 0 deletions