linux-stable/tools
Nico Pache c9c3cc6a13 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:18 -04:00
..
accounting
arch parisc: Drop the HP-UX ENOSYM and EREMOTERELEASE error codes 2023-12-08 08:46:12 +01:00
bootconfig bootconfig: Fix testcase to increase max node 2023-04-05 11:23:34 +02:00
bpf bpftool: Use a local bpf_perf_event_value to fix accessing its fields 2023-09-19 12:20:07 +02:00
build tools build: Switch to new openssl API for test-libcrypto 2022-08-25 11:38:01 +02:00
cgroup
debugging
edid
firewire
firmware
gpio tools: gpio: fix debounce_period_us output of lsgpio 2023-06-21 15:45:35 +02:00
hv vmbus_testing: fix wrong python syntax for integer value comparison 2023-09-19 12:20:05 +02:00
iio tools: iio: iio_generic_buffer ensure alignment 2023-11-20 11:06:53 +01:00
include bpf: Add crosstask check to __bpf_get_stack 2024-01-25 14:37:43 -08:00
io_uring
kvm/kvm_stat tools/kvm_stat: fix display of error when multiple processes are found 2022-08-11 13:06:45 +02:00
laptop
leds
lib libsubcmd: Fix memory leak in uniq() 2024-02-23 08:42:14 +01:00
memory-model
objtool objtool/x86: add missing embedded_insn check 2023-11-08 17:30:47 +01:00
pci
pcmcia
perf perf env: Avoid recursively taking env->bpf_progs.lock 2024-01-25 14:37:55 -08:00
power tools/power/turbostat: Fix a knl bug 2023-11-28 16:54:55 +00:00
scripts
spi
testing selftests: mm: fix map_hugetlb failure on 64K page size systems 2024-03-15 10:48:18 -04:00
thermal/tmon tools/thermal: Fix possible path truncations 2022-08-21 15:16:12 +02:00
time
usb
virtio tools/virtio: fix the vringh test for virtio ring changes 2023-02-22 12:55:53 +01:00
vm tools/vm/slabinfo-gnuplot: use "grep -E" instead of "egrep" 2022-12-08 11:23:57 +01:00
wmi
Makefile