aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/oom_kill.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index 907e2c0ad7a6..64cdacad83d9 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -645,6 +645,16 @@ void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask,
645 /* Got some memory back in the last second. */ 645 /* Got some memory back in the last second. */
646 return; 646 return;
647 647
648 /*
649 * If current has a pending SIGKILL, then automatically select it. The
650 * goal is to allow it to allocate so that it may quickly exit and free
651 * its memory.
652 */
653 if (fatal_signal_pending(current)) {
654 set_thread_flag(TIF_MEMDIE);
655 return;
656 }
657
648 if (sysctl_panic_on_oom == 2) { 658 if (sysctl_panic_on_oom == 2) {
649 dump_header(NULL, gfp_mask, order, NULL); 659 dump_header(NULL, gfp_mask, order, NULL);
650 panic("out of memory. Compulsory panic_on_oom is selected.\n"); 660 panic("out of memory. Compulsory panic_on_oom is selected.\n");