diff options
Diffstat (limited to 'fs/exec.c')
-rw-r--r-- | fs/exec.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -167,7 +167,12 @@ out: | |||
167 | } | 167 | } |
168 | 168 | ||
169 | #ifdef CONFIG_MMU | 169 | #ifdef CONFIG_MMU |
170 | 170 | /* | |
171 | * The nascent bprm->mm is not visible until exec_mmap() but it can | ||
172 | * use a lot of memory, account these pages in current->mm temporary | ||
173 | * for oom_badness()->get_mm_rss(). Once exec succeeds or fails, we | ||
174 | * change the counter back via acct_arg_size(0). | ||
175 | */ | ||
171 | static void acct_arg_size(struct linux_binprm *bprm, unsigned long pages) | 176 | static void acct_arg_size(struct linux_binprm *bprm, unsigned long pages) |
172 | { | 177 | { |
173 | struct mm_struct *mm = current->mm; | 178 | struct mm_struct *mm = current->mm; |