diff --git a/[refs] b/[refs] index 4fdcbda5bd29..eef1c164f9bf 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5918d10a4bb1081920a04e2c17197a02ff06e651 +refs/heads/master: 465adcf1ea7b2e49b2e0899366624f5532b64012 diff --git a/trunk/mm/memcontrol.c b/trunk/mm/memcontrol.c index c92bcfc5466e..47b36fea7e1f 100644 --- a/trunk/mm/memcontrol.c +++ b/trunk/mm/memcontrol.c @@ -1787,11 +1787,11 @@ static void mem_cgroup_out_of_memory(struct mem_cgroup *memcg, gfp_t gfp_mask, struct task_struct *chosen = NULL; /* - * 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 current has a pending SIGKILL or is exiting, 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)) { + if (fatal_signal_pending(current) || current->flags & PF_EXITING) { set_thread_flag(TIF_MEMDIE); return; }