[PATCH] mm, oom_reaper: clear oom_reaper_list before clearing TIF_MEMDIE
From: Michal Hocko
Date: Fri Apr 08 2016 - 09:04:29 EST
As per Tetsuo:
: oom_reaper() will need to do "tsk->oom_reaper_list = NULL;" due to
:
: if (tsk == oom_reaper_list || tsk->oom_reaper_list)
: return;
:
: test in wake_oom_reaper() if "[PATCH 3/3] mm, oom_reaper: clear
: TIF_MEMDIE for all tasks queued for oom_reaper" will select the same
: thread again
Signed-off-by: Michal Hocko <mhocko@xxxxxxxx>
---
mm/oom_kill.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index 7098104b7475..ca34036f3ae1 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -540,6 +540,7 @@ static void oom_reap_task(struct task_struct *tsk)
* for the oom victim right now because it cannot release its memory
* itself nor by the oom reaper.
*/
+ tsk->oom_reaper_list = NULL;
exit_oom_victim(tsk);
/* Drop a reference taken by wake_oom_reaper */
--
2.8.0.rc3
--
Michal Hocko
SUSE Labs