]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm-oom_kill-fix-the-wrong-task-mm-==-mm-checks-in-oom_kill_process-fix
authorAndrew Morton <akpm@linux-foundation.org>
Wed, 21 Oct 2015 22:03:11 +0000 (09:03 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 21 Oct 2015 22:03:11 +0000 (09:03 +1100)
document process_shares_mm() a bit

Cc: David Rientjes <rientjes@google.com>
Cc: Kyle Walker <kwalker@redhat.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Stanislav Kozina <skozina@redhat.com>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/oom_kill.c

index 52abb78633d54509db9015710220f097042152ac..d13a33918fa23e685bc629bc23f58d97729beb62 100644 (file)
@@ -483,6 +483,12 @@ void oom_killer_enable(void)
        oom_killer_disabled = false;
 }
 
+/*
+ * task->mm can be NULL if the task is the exited group leader.  So to
+ * determine whether the task is using a particular mm, we examine all the
+ * task's threads: if one of those is using this mm then this task was also
+ * using it.
+ */
 static bool process_shares_mm(struct task_struct *p, struct mm_struct *mm)
 {
        struct task_struct *t;