]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - mm/mmap.c
powerpc: Fix pciconfig_iobase system call on PCI-Express powermac
[linux-2.6-omap-h63xx.git] / mm / mmap.c
index e4507b23e6208909caaed2ffc00c090b18131447..a910c045cfd4241601306257c8822bda7f1ee05a 100644 (file)
--- a/mm/mmap.c
+++ b/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)  /* Can happen if dup_mmap() received an OOM */
+               return;
+
        if (mm->locked_vm) {
                vma = mm->mmap;
                while (vma) {
@@ -2102,7 +2105,7 @@ void exit_mmap(struct mm_struct *mm)
        lru_add_drain();
        flush_cache_mm(mm);
        tlb = tlb_gather_mmu(mm, 1);
-       /* Don't update_hiwater_rss(mm) here, do_exit already did */
+       /* update_hiwater_rss(mm) here? but nobody should be looking */
        /* Use -1 here to ensure all VMAs in the mm are unmapped */
        end = unmap_vmas(&tlb, vma, 0, -1, &nr_accounted, NULL);
        vm_unacct_memory(nr_accounted);