Skip to content

Commit

Permalink
oom: kill all threads that share mm with killed task
Browse files Browse the repository at this point in the history
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 f2a2a71)

Acked-by: William Irwin <[email protected]>
Acked-by: Christoph Lameter <[email protected]>
Cc: Nick Piggin <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Andi Kleen <[email protected]>
Signed-off-by: David Rientjes <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
rientjes authored and Linus Torvalds committed Apr 24, 2007
1 parent c445a31 commit 650a7c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/oom_kill.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 650a7c9

Please sign in to comment.