The patch below does not apply to the 5.10-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <stable@xxxxxxxxxxxxxxx>. To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.10.y git checkout FETCH_HEAD git cherry-pick -x 1723f04caacb32cadc4e063725d836a0c4450694 # <resolve conflicts, build, test, etc.> git commit -s git send-email --to '<stable@xxxxxxxxxxxxxxx>' --in-reply-to '2024071539-magnetize-nimble-15ba@gregkh' --subject-prefix 'PATCH 5.10.y' HEAD^.. Possible dependencies: 1723f04caacb ("Fix userfaultfd_api to return EINVAL as expected") 2ff559f31a5d ("Revert "userfaultfd: don't fail on unrecognized features"") 914eedcb9ba0 ("userfaultfd: don't fail on unrecognized features") b1f9e876862d ("mm/uffd: enable write protection for shmem & hugetlbfs") 824ddc601adc ("userfaultfd: provide unmasked address on page-fault") 964ab0040ff9 ("userfaultfd/shmem: advertise shmem minor fault support") c949b097ef2e ("userfaultfd/shmem: support minor fault registration for shmem") 00b151f21f39 ("mm/userfaultfd: fail uffd-wp registration if not supported") b8da5cd4e5f1 ("userfaultfd: update documentation to describe minor fault handling") f619147104c8 ("userfaultfd: add UFFDIO_CONTINUE ioctl") 7677f7fd8be7 ("userfaultfd: add minor fault registration mode") 44835d20b2a0 ("mm: add FGP_ENTRY") 8f251a3d5ce3 ("hugetlb: convert page_huge_active() HPageMigratable flag") d6995da31122 ("hugetlb: use page.private for hugetlb specific page flags") 99ca0edb41aa ("Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux") thanks, greg k-h ------------------ original commit in Linus's tree ------------------