From: David Rientjes Date: Tue, 24 Apr 2007 04:36:13 +0000 (-0700) Subject: oom: kill all threads that share mm with killed task X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=650a7c974f1b91de9732c0f720e792837f8abfd6;p=linux-beck.git oom: kill all threads that share mm with killed task oom_kill_task() calls __oom_kill_task() to OOM kill a selected task. When finding other threads that share an mm with that task, we need to kill those individual threads and not the same one. (Bug introduced by f2a2a7108aa0039ba7a5fe7a0d2ecef2219a7584) Acked-by: William Irwin Acked-by: Christoph Lameter Cc: Nick Piggin Cc: Andrew Morton Cc: Andi Kleen Signed-off-by: David Rientjes Signed-off-by: Linus Torvalds --- diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 2f3916986abf..af981b645a69 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -333,7 +333,7 @@ static int oom_kill_task(struct task_struct *p) */ do_each_thread(g, q) { if (q->mm == mm && q->tgid != p->tgid) - force_sig(SIGKILL, p); + force_sig(SIGKILL, q); } while_each_thread(g, q); return 0;