Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 207208
b: refs/heads/master
c: 7b98c2e
h: refs/heads/master
v: v3
  • Loading branch information
David Rientjes authored and Linus Torvalds committed Aug 10, 2010
1 parent 2006059 commit 19a2ae0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c81fac5cb8c92b8b4795ac250a46c7514d1fce06
refs/heads/master: 7b98c2e402eaa1f2beec18b1bde17f74948a19db
10 changes: 10 additions & 0 deletions trunk/mm/oom_kill.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,16 @@ void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask,
/* Got some memory back in the last second. */
return;

/*
* If current has a pending SIGKILL, then automatically select it. The
* goal is to allow it to allocate so that it may quickly exit and free
* its memory.
*/
if (fatal_signal_pending(current)) {
set_thread_flag(TIF_MEMDIE);
return;
}

if (sysctl_panic_on_oom == 2) {
dump_header(NULL, gfp_mask, order, NULL);
panic("out of memory. Compulsory panic_on_oom is selected.\n");
Expand Down

0 comments on commit 19a2ae0

Please sign in to comment.