Re: [PATCH v8] hugetlbfs: move lock assertions after early returns in huge_pmd_unshare()
From: Mark Brown
Date: Wed Oct 22 2025 - 10:34:15 EST
On Tue, Oct 14, 2025 at 05:03:44PM +0530, Deepanshu Kartikey wrote:
> When hugetlb_vmdelete_list() processes VMAs during truncate operations,
> it may encounter VMAs where huge_pmd_unshare() is called without the
> required shareable lock. This triggers an assertion failure in
> hugetlb_vma_assert_locked().
On current mainline this translates the test from a fail to a skip on
the Raspberry Pi 4:
# # -------------------------
# # running ./hugetlb-madvise
# # -------------------------
# # [SKIP]
# ok 6 hugetlb-madvise # SKIP
# # hugepages not supported
due to:
[ 0.000000] Kernel command line: console=ttyS1,115200n8 root=/dev/nfs rw nfsroot=172.16.0.2:/var/lib/lava/dispatcher/tmp/1991635/extract-nfsrootfs-9ik0m73w,tcp,hard secretmem.enable hugepagesz=32M hugepages=0:4 default_hugepagesz=2M hugepages=0:128 hugepagesz=64K hugepages=0:4 kpti=off ip=dhcp
[ 0.000000] Unknown kernel command line parameters "hugepagesz=64K hugepages=0:4 default_hugepagesz=2M", will be passed to user space.
which used to DTRT but I doubt is due to this specific patch...
Attachment:
signature.asc
Description: PGP signature