Prev: [PATCH 1/5] kgdb: have ebin2mem call probe_kernel_write once
Next: [PATCH -mm 2/4] oom: select_bad_process: PF_EXITING check should take ->mm into account
From: Oleg Nesterov on 2 Apr 2010 14:40 select_bad_process() thinks a kernel thread can't have ->mm != NULL, this is not true due to use_mm(). Change the code to check PF_KTHREAD. Signed-off-by: Oleg Nesterov <oleg(a)redhat.com> --- mm/oom_kill.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) --- MM/mm/oom_kill.c~1_FLITER_OUT_KTHREADS 2010-03-31 17:47:14.000000000 +0200 +++ MM/mm/oom_kill.c 2010-04-02 18:51:05.000000000 +0200 @@ -290,8 +290,8 @@ static struct task_struct *select_bad_pr for_each_process(p) { unsigned int points; - /* 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; @@ -331,8 +331,7 @@ static struct task_struct *select_bad_pr } /* - * skip kernel threads and tasks which have already released - * their mm. + * skip the tasks which have already released their mm. */ if (!p->mm) continue; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |