Commit 650a7c974f1b91de9732c0f720e792837f8abfd6

Authored by David Rientjes
Committed by Linus Torvalds
1 parent c445a31cd7

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 <bill.irwin@oracle.com>
Acked-by: Christoph Lameter <clameter@engr.sgi.com>
Cc: Nick Piggin <npiggin@suse.de>
Cc: Andrew Morton <akpm@osdl.org>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -333,7 +333,7 @@
333 333 */
334 334 do_each_thread(g, q) {
335 335 if (q->mm == mm && q->tgid != p->tgid)
336   - force_sig(SIGKILL, p);
  336 + force_sig(SIGKILL, q);
337 337 } while_each_thread(g, q);
338 338  
339 339 return 0;