From: Michal Hocko Date: Fri, 7 Oct 2016 23:57:32 +0000 (-0700) Subject: mm/oom_kill.c: fix task_will_free_mem() comment X-Git-Tag: v4.14-rc1~2320^2~112 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5870c2e1d78b043b69de3199469c056ca3b05102;p=platform%2Fkernel%2Flinux-rpi.git mm/oom_kill.c: fix task_will_free_mem() comment Attempt to demystify the task_will_free_mem() loop. Cc: Tetsuo Handa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/oom_kill.c b/mm/oom_kill.c index ef175518f05f..463cdd22d4e0 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -803,8 +803,9 @@ static bool task_will_free_mem(struct task_struct *task) return true; /* - * This is really pessimistic but we do not have any reliable way - * to check that external processes share with our mm + * Make sure that all tasks which share the mm with the given tasks + * are dying as well to make sure that a) nobody pins its mm and + * b) the task is also reapable by the oom reaper. */ rcu_read_lock(); for_each_process(p) {