linux-stable/tools
Nico Pache 47c68edecc selftests: mm: fix map_hugetlb failure on 64K page size systems
[ Upstream commit 91b80cc5b3 ]

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>
2024-03-15 10:48:16 -04:00
..
accounting
arch x86/bugs: Increase the x86 bugs vector size to two u32s 2023-08-08 19:56:37 +02:00
bpf bpftool: Fix bug for long instructions in program CFG dumps 2023-05-17 11:35:42 +02:00
build tools features: Add feature test to check if libbfd has buildid support 2023-09-23 11:00:05 +02:00
cgroup
debugging
firewire
firmware
gpio tools: gpio-hammer: Avoid potential overflow in main 2020-10-01 13:17:47 +02:00
hv
iio tools: iio: iio_generic_buffer ensure alignment 2023-11-20 10:30:14 +01:00
include tools headers UAPI: Sync linux/perf_event.h with the kernel sources 2023-12-13 18:18:17 +01:00
io_uring tools/io_uring: fix compile breakage 2020-10-07 08:01:27 +02:00
kvm/kvm_stat
laptop
leds
lib libsubcmd: Fix memory leak in uniq() 2024-02-23 08:25:03 +01:00
memory-model
nfsd
objtool objtool: Add a missing comma to avoid string concatenation 2023-02-06 07:52:49 +01:00
pci
pcmcia
perf perf top: Skip side-band event setup if HAVE_LIBBPF_SUPPORT is not set 2024-01-25 14:34:33 -08:00
power tools/power/turbostat: Fix a knl bug 2023-11-28 16:50:17 +00:00
scripts tools: Allow proper CC/CXX/... override with LLVM=1 in Makefile.include 2021-07-31 08:19:37 +02:00
spi
testing selftests: mm: fix map_hugetlb failure on 64K page size systems 2024-03-15 10:48:16 -04:00
thermal/tmon tools/thermal: Fix possible path truncations 2022-08-25 11:18:09 +02:00
time
usb usb: testusb: Fix for showing the connection speed 2021-10-09 14:39:49 +02:00
virtio tools/virtio: fix the vringh test for virtio ring changes 2023-02-22 12:50:34 +01:00
vm tools/vm/slabinfo-gnuplot: use "grep -E" instead of "egrep" 2022-12-08 11:23:04 +01:00
wmi
Makefile