The patch titled Subject: mm: fix BUG_ON() in vmf_insert_pfn_pud() from VM_MIXEDMAP removal has been added to the -mm tree. Its filename is mm-fix-bug_on-in-vmf_insert_pfn_pud-from-vm_mixedmap-removal.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-fix-bug_on-in-vmf_insert_pfn_pud-from-vm_mixedmap-removal.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-fix-bug_on-in-vmf_insert_pfn_pud-from-vm_mixedmap-removal.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: Dave Jiang <dave.jiang@xxxxxxxxx> Subject: mm: fix BUG_ON() in vmf_insert_pfn_pud() from VM_MIXEDMAP removal It looks like I missed the PUD path when doing VM_MIXEDMAP removal. This can be triggered by: 1. Boot with memmap=4G!8G 2. build ndctl with destructive flag on 3. make TESTS=device-dax check [ +0.000675] kernel BUG at mm/huge_memory.c:824! Applying the same change that was applied to vmf_insert_pfn_pmd() in the original patch. Link: http://lkml.kernel.org/r/153565957352.35524.1005746906902065126.stgit@xxxxxxxxxxxxxxxxxxxxxxxxxx Fixes: e1fb4a08649 ("dax: remove VM_MIXEDMAP for fsdax and device dax") Signed-off-by: Dave Jiang <dave.jiang@xxxxxxxxx> Reported-by: Vishal Verma <vishal.l.verma@xxxxxxxxx> Tested-by: Vishal Verma <vishal.l.verma@xxxxxxxxx> Acked-by: Jeff Moyer <jmoyer@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- diff -puN mm/huge_memory.c~mm-fix-bug_on-in-vmf_insert_pfn_pud-from-vm_mixedmap-removal mm/huge_memory.c --- a/mm/huge_memory.c~mm-fix-bug_on-in-vmf_insert_pfn_pud-from-vm_mixedmap-removal +++ a/mm/huge_memory.c @@ -821,11 +821,11 @@ vm_fault_t vmf_insert_pfn_pud(struct vm_ * but we need to be consistent with PTEs and architectures that * can't support a 'special' bit. */ - BUG_ON(!(vma->vm_flags & (VM_PFNMAP|VM_MIXEDMAP))); + BUG_ON(!(vma->vm_flags & (VM_PFNMAP|VM_MIXEDMAP)) && + !pfn_t_devmap(pfn)); BUG_ON((vma->vm_flags & (VM_PFNMAP|VM_MIXEDMAP)) == (VM_PFNMAP|VM_MIXEDMAP)); BUG_ON((vma->vm_flags & VM_PFNMAP) && is_cow_mapping(vma->vm_flags)); - BUG_ON(!pfn_t_devmap(pfn)); if (addr < vma->vm_start || addr >= vma->vm_end) return VM_FAULT_SIGBUS; _ Patches currently in -mm which might be from dave.jiang@xxxxxxxxx are mm-fix-bug_on-in-vmf_insert_pfn_pud-from-vm_mixedmap-removal.patch