Skip to content

Commit

Permalink
x86_64: During VM oom condition, kill all threads in process group
Browse files Browse the repository at this point in the history
During a VM oom condition, kill all threads in the process group.

We have had complaints where a threaded application is left in a bad state
after one of it's threads is killed when we hit a VM: out_of_memory condition.

Killing just one of the process threads can leave the application in a bad
state, whereas killing the entire process group would allow for the
application to restart, or otherwise handled, and makes it very obvious that
something has gone wrong.

This change allows the entire process group to be taken down, rather than just
the one thread.

Signed-off-by: Will <will_schmidt@vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Will Schmidt authored and Linus Torvalds committed Jul 22, 2007
1 parent 99253b8 commit 021daae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86_64/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
}
printk("VM: killing process %s\n", tsk->comm);
if (error_code & 4)
do_exit(SIGKILL);
do_group_exit(SIGKILL);
goto no_context;

do_sigbus:
Expand Down

0 comments on commit 021daae

Please sign in to comment.