diff options
Diffstat (limited to 'mm/mmap.c')
-rw-r--r-- | mm/mmap.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -175,7 +175,8 @@ int __vm_enough_memory(struct mm_struct *mm, long pages, int cap_sys_admin) | |||
175 | 175 | ||
176 | /* Don't let a single process grow too big: | 176 | /* Don't let a single process grow too big: |
177 | leave 3% of the size of this process for other processes */ | 177 | leave 3% of the size of this process for other processes */ |
178 | allowed -= mm->total_vm / 32; | 178 | if (mm) |
179 | allowed -= mm->total_vm / 32; | ||
179 | 180 | ||
180 | /* | 181 | /* |
181 | * cast `allowed' as a signed long because vm_committed_space | 182 | * cast `allowed' as a signed long because vm_committed_space |