The patch titled Subject: mm: thp: fix a double unlock bug has been added to the -mm tree. Its filename is mm-thp-refactor-numa-fault-handling-fix.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/mm-thp-refactor-numa-fault-handling-fix.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/mm-thp-refactor-numa-fault-handling-fix.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Subject: mm: thp: fix a double unlock bug We're supposed to be holding the "vmf->ptl" spin_lock when we goto out_map. The lock is dropped after if finishes cleaning up. Link: https://lkml.kernel.org/r/YLX8uYN01JmfLnlK@mwanda Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Acked-by: Mel Gorman <mgorman@xxxxxxx> Acked-by: Yang Shi <shy828301@xxxxxxxxx> Cc: Christian Borntraeger <borntraeger@xxxxxxxxxx> Cc: Gerald Schaefer <gerald.schaefer@xxxxxxxxxxxxx> Cc: Heiko Carstens <hca@xxxxxxxxxxxxx> Cc: Huang Ying <ying.huang@xxxxxxxxx> Cc: Hugh Dickins <hughd@xxxxxxxxxx> Cc: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx> Cc: Michal Hocko <mhocko@xxxxxxxx> Cc: Vasily Gorbik <gor@xxxxxxxxxxxxx> Cc: Zi Yan <ziy@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/huge_memory.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/mm/huge_memory.c~mm-thp-refactor-numa-fault-handling-fix +++ a/mm/huge_memory.c @@ -1465,10 +1465,8 @@ vm_fault_t do_huge_pmd_numa_page(struct pmd = pmd_modify(oldpmd, vma->vm_page_prot); page = vm_normal_page_pmd(vma, haddr, pmd); - if (!page) { - spin_unlock(vmf->ptl); + if (!page) goto out_map; - } /* See similar comment in do_numa_page for explanation */ if (!was_writable) _ Patches currently in -mm which might be from dan.carpenter@xxxxxxxxxx are ocfs2-fix-snprintf-checking.patch mm-thp-refactor-numa-fault-handling-fix.patch