mm,oom_reaper: don't call mmput_async() without atomic_inc_not_zero()
Subsystems (2)
[email protected]
maintainerPATCH 1/41 mm,oom_reaper: don't call mmput_async() without atomic_inc_not_zero()
From: Tetsuo Handa <[email protected]>
Subject: mm,oom_reaper: don't call mmput_async() without atomic_inc_not_zero()
Commit e2fe14564d3316d1 ("oom_reaper: close race with exiting task") reduced frequency of needlessly selecting next OOM victim, but was calling mmput_async() when atomic_inc_not_zero() failed.
Link http://lkml.kernel.org/r/1464423365-5555-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp open here
Signed-off-by Tetsuo Handa <[email protected]>
Acked-by Michal Hocko <[email protected]>
Cc Arnd Bergmann <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
mm/oom_kill.c | 1 + 1 file changed, 1 insertion(+)
mm/oom_kill.c renamed from mm/oom_kill.c~mmoom_reaper-dont-call-mmput_async-without-atomic_inc_not_zero +1 -0
@@ -478,6 +478,7 @@ static bool __oom_reap_task(struct task_ mm = p->mm;if (!atomic_inc_not_zero (&mm->mm_users)) {task_unlock (p); + mm =NULL ; goto unlock_oom; }
_