Message ID | 1405459771-10264-1-git-send-email-kamal@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index f506001..44b0eec 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -2706,8 +2706,9 @@ static int __mem_cgroup_try_charge(struct mm_struct *mm, * in system level. So, allow to go ahead dying process in addition to * MEMDIE process. */ - if (unlikely(test_thread_flag(TIF_MEMDIE) - || fatal_signal_pending(current))) + if (unlikely(test_thread_flag(TIF_MEMDIE) || + fatal_signal_pending(current) || + current->flags & PF_EXITING)) goto bypass; if (unlikely(task_in_memcg_oom(current)))