From: Oleg Nesterov Date: Sun, 6 Mar 2011 17:03:11 +0000 (+0100) Subject: exec: document acct_arg_size() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ae6b585eeb74670a2dec1fe4394bdfbdb9395cc2;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git exec: document acct_arg_size() Add the comment to explain acct_arg_size(). Signed-off-by: Oleg Nesterov Reviewed-by: KOSAKI Motohiro --- diff --git a/fs/exec.c b/fs/exec.c index 89d788ca7829..5cb53f0232b1 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -167,7 +167,12 @@ out: } #ifdef CONFIG_MMU - +/* + * The nascent bprm->mm is not visible until exec_mmap() but it can + * use a lot of memory, account these pages in current->mm temporary + * for oom_badness()->get_mm_rss(). Once exec succeeds or fails, we + * change the counter back via acct_arg_size(0). + */ static void acct_arg_size(struct linux_binprm *bprm, unsigned long pages) { struct mm_struct *mm = current->mm;