diff --git a/kernel/exit.c b/kernel/exit.c index e5c4668f1799d15ce1d527b1e357d795f3d748ea..88c6b3e425834e89943bb1a291a7a350333e3593 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -455,6 +455,7 @@ static void exit_mm(struct task_struct * tsk) task_unlock(tsk); mm_update_next_owner(mm); mmput(mm); + clear_thread_flag(TIF_MEMDIE); } /* diff --git a/mm/oom_kill.c b/mm/oom_kill.c index d33aca1552addc67196e47939405befe330f6f13..1e11df8fa7ecaecd274a3d0aaa1fe0aea4bb38ab 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -258,8 +258,6 @@ enum oom_scan_t oom_scan_process_thread(struct task_struct *task, unsigned long totalpages, const nodemask_t *nodemask, bool force_kill) { - if (task->exit_state) - return OOM_SCAN_CONTINUE; if (oom_unkillable_task(task, NULL, nodemask)) return OOM_SCAN_CONTINUE;