From 764f9cab5ea579963d36db809809149b7624fe77 Mon Sep 17 00:00:00 2001 From: Oleg Nesterov Date: Mon, 9 Aug 2010 17:18:43 -0700 Subject: [PATCH] --- yaml --- r: 207202 b: refs/heads/master c: 455c0e5fb03b67fa62bd12e3abe3fa484b9960c5 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/mm/oom_kill.c | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 0f3cef5d0119..8e7d3753e9f6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a9877cc2937889e5669114f28612b494384152a4 +refs/heads/master: 455c0e5fb03b67fa62bd12e3abe3fa484b9960c5 diff --git a/trunk/mm/oom_kill.c b/trunk/mm/oom_kill.c index 709aedfaa014..7c0dc414dba8 100644 --- a/trunk/mm/oom_kill.c +++ b/trunk/mm/oom_kill.c @@ -256,14 +256,11 @@ static struct task_struct *select_bad_process(unsigned long *ppoints, for_each_process(p) { unsigned long points; - /* - * skip kernel threads and tasks which have already released - * their mm. - */ + /* skip tasks that have already released their mm */ if (!p->mm) continue; - /* skip the init task */ - if (is_global_init(p)) + /* skip the init task and kthreads */ + if (is_global_init(p) || (p->flags & PF_KTHREAD)) continue; if (mem && !task_in_mem_cgroup(p, mem)) continue;