The patch titled Subject: userfaultfd/shmem: fix minor fault page leak has been removed from the -mm tree. Its filename was userfaultfd-support-minor-fault-handling-for-shmem-fix-2.patch This patch was dropped because it was folded into userfaultfd-support-minor-fault-handling-for-shmem.patch ------------------------------------------------------ From: Axel Rasmussen <axelrasmussen@xxxxxxxxxx> Subject: userfaultfd/shmem: fix minor fault page leak This fix is analogous to Peter Xu's fix for hugetlb [0]. If we don't put_page() after getting the page out of the page cache, we leak the reference. The fix can be verified by checking /proc/meminfo and running the userfaultfd selftest in shmem mode. Without the fix, we see MemFree / MemAvailable steadily decreasing with each run of the test. With the fix, memory is correctly freed after the test program exits. Link: https://lkml.kernel.org/r/20210322204836.1650221-1-axelrasmussen@xxxxxxxxxx Signed-off-by: Axel Rasmussen <axelrasmussen@xxxxxxxxxx> Reviewed-by: Peter Xu <peterx@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/shmem.c | 1 + 1 file changed, 1 insertion(+) --- a/mm/shmem.c~userfaultfd-support-minor-fault-handling-for-shmem-fix-2 +++ a/mm/shmem.c @@ -1831,6 +1831,7 @@ repeat: if (page && vma && userfaultfd_minor(vma)) { unlock_page(page); + put_page(page); *fault_type = handle_userfault(vmf, VM_UFFD_MINOR); return 0; } _ Patches currently in -mm which might be from axelrasmussen@xxxxxxxxxx are userfaultfd-add-minor-fault-registration-mode.patch userfaultfd-disable-huge-pmd-sharing-for-minor-registered-vmas.patch userfaultfd-hugetlbfs-only-compile-uffd-helpers-if-config-enabled.patch userfaultfd-add-uffdio_continue-ioctl.patch userfaultfd-update-documentation-to-describe-minor-fault-handling.patch userfaultfd-selftests-add-test-exercising-minor-fault-handling.patch userfaultfd-support-minor-fault-handling-for-shmem.patch userfaultfd-support-minor-fault-handling-for-shmem-fix-3.patch userfaultfd-support-minor-fault-handling-for-shmem-fix-4.patch userfaultfd-selftests-use-memfd_create-for-shmem-test-type.patch userfaultfd-selftests-create-alias-mappings-in-the-shmem-test.patch userfaultfd-selftests-reinitialize-test-context-in-each-test.patch userfaultfd-selftests-exercise-minor-fault-handling-shmem-support.patch