aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memcontrol.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r--mm/memcontrol.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index c92bcfc5466e..47b36fea7e1f 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1787,11 +1787,11 @@ static void mem_cgroup_out_of_memory(struct mem_cgroup *memcg, gfp_t gfp_mask,
1787 struct task_struct *chosen = NULL; 1787 struct task_struct *chosen = NULL;
1788 1788
1789 /* 1789 /*
1790 * If current has a pending SIGKILL, then automatically select it. The 1790 * If current has a pending SIGKILL or is exiting, then automatically
1791 * goal is to allow it to allocate so that it may quickly exit and free 1791 * select it. The goal is to allow it to allocate so that it may
1792 * its memory. 1792 * quickly exit and free its memory.
1793 */ 1793 */
1794 if (fatal_signal_pending(current)) { 1794 if (fatal_signal_pending(current) || current->flags & PF_EXITING) {
1795 set_thread_flag(TIF_MEMDIE); 1795 set_thread_flag(TIF_MEMDIE);
1796 return; 1796 return;
1797 } 1797 }