aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/oom_kill.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index 3100bc57036b..62a5cec08a17 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -549,6 +549,17 @@ void mem_cgroup_out_of_memory(struct mem_cgroup *mem, gfp_t gfp_mask)
549 unsigned int points = 0; 549 unsigned int points = 0;
550 struct task_struct *p; 550 struct task_struct *p;
551 551
552 /*
553 * If current has a pending SIGKILL, then automatically select it. The
554 * goal is to allow it to allocate so that it may quickly exit and free
555 * its memory.
556 */
557 if (fatal_signal_pending(current)) {
558 set_thread_flag(TIF_MEMDIE);
559 boost_dying_task_prio(current, NULL);
560 return;
561 }
562
552 check_panic_on_oom(CONSTRAINT_MEMCG, gfp_mask, 0, NULL); 563 check_panic_on_oom(CONSTRAINT_MEMCG, gfp_mask, 0, NULL);
553 limit = mem_cgroup_get_limit(mem) >> PAGE_SHIFT; 564 limit = mem_cgroup_get_limit(mem) >> PAGE_SHIFT;
554 read_lock(&tasklist_lock); 565 read_lock(&tasklist_lock);