From 491afb5c87e498f8d63156cdc06487d0c322ef77 Mon Sep 17 00:00:00 2001 From: David Rientjes Date: Mon, 29 Apr 2013 15:08:45 -0700 Subject: [PATCH] --- yaml --- r: 365455 b: refs/heads/master c: 465adcf1ea7b2e49b2e0899366624f5532b64012 h: refs/heads/master i: 365453: 03147ab8c81de05aa74ad7dbb6221878ac770f39 365451: 5c86a57bd2b5038b2ad949a0807b63bc9f1ff10e 365447: 2796795b84d3494baf91683a21c34750d953c815 365439: 1317529c9c19485b3aa0db74e689f98985fb35e9 v: v3 --- [refs] | 2 +- trunk/mm/memcontrol.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) 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; }