The patch titled mm: check for no mmaps in exit_mmap() has been added to the -mm tree. Its filename is mm-check-for-no-mmaps-in-exit_mmap.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/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: mm: check for no mmaps in exit_mmap() From: Johannes Weiner <hannes@xxxxxxxxxxx> When dup_mmap() ooms we can end up with mm->mmap == NULL. The error path does mmput() and unmap_vmas() gets a NULL vma which it dereferences. In exit_mmap() there is nothing to do at all for this case, we can cancel the callpath right there. Signed-off-by: Johannes Weiner <hannes@xxxxxxxxxxx> Reported-by: Akinobu Mita <akinobu.mita@xxxxxxxxx> Cc: Nick Piggin <nickpiggin@xxxxxxxxxxxx> Cc: Hugh Dickins <hugh@xxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/mmap.c | 3 +++ 1 file changed, 3 insertions(+) diff -puN mm/mmap.c~mm-check-for-no-mmaps-in-exit_mmap mm/mmap.c --- a/mm/mmap.c~mm-check-for-no-mmaps-in-exit_mmap +++ a/mm/mmap.c @@ -2090,6 +2090,9 @@ void exit_mmap(struct mm_struct *mm) arch_exit_mmap(mm); mmu_notifier_release(mm); + if (!mm->mmap) + return; + if (mm->locked_vm) { vma = mm->mmap; while (vma) { _ Patches currently in -mm which might be from hannes@xxxxxxxxxxx are mm-more-likely-reclaim-madv_sequential-mappings.patch mm-apply_to_range-call-pte-function-with-lazy-updates.patch vmscan-shrink_active_list-reduce-lru_lock-hold-time.patch mm-check-for-no-mmaps-in-exit_mmap.patch mm-check-for-no-mmaps-in-exit_mmap-fix.patch dma_alloc_from_coherent-fix-fallback-to-generic-memory.patch dma_alloc_coherent-clean-it-up.patch dma-coherent-catch-oversized-requests-to-dma_alloc_from_coherent.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html