]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - mm/mmap.c
nfsd: fix vm overcommit crash
[linux-2.6-omap-h63xx.git] / mm / mmap.c
index 74f4d158022ec00ae1d405596fdbb5bb465c88b5..de14ac21e5b55d647fa732f5a6230ce2e2764824 100644 (file)
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -175,7 +175,8 @@ int __vm_enough_memory(struct mm_struct *mm, long pages, int cap_sys_admin)
 
        /* Don't let a single process grow too big:
           leave 3% of the size of this process for other processes */
-       allowed -= mm->total_vm / 32;
+       if (mm)
+               allowed -= mm->total_vm / 32;
 
        /*
         * cast `allowed' as a signed long because vm_committed_space