diff options
authorTetsuo Handa <>2016-10-07 17:00:49 -0700
committerLinus Torvalds <>2016-10-07 18:46:29 -0700
commita104808e212a9ee97e6b9cb6945185e50905f009 (patch)
parent20311420282f3402888f1d9b8b80d924d491aadf (diff)
mm: don't emit warning from pagefault_out_of_memory()
Commit c32b3cbe0d06 ("oom, PM: make OOM detection in the freezer path raceless") inserted a WARN_ON() into pagefault_out_of_memory() in order to warn when we raced with disabling the OOM killer. Now, patch "oom, suspend: fix oom_killer_disable vs. pm suspend properly" introduced a timeout for oom_killer_disable(). Even if we raced with disabling the OOM killer and the system is OOM livelocked, the OOM killer will be enabled eventually (in 20 seconds by default) and the OOM livelock will be solved. Therefore, we no longer need to warn when we raced with disabling the OOM killer. Link: Signed-off-by: Tetsuo Handa <> Acked-by: Michal Hocko <> Cc: David Rientjes <> Cc: Johannes Weiner <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
1 files changed, 1 insertions, 11 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index 0034baf35f0c..f284e92a71f0 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -1069,16 +1069,6 @@ void pagefault_out_of_memory(void)
if (!mutex_trylock(&oom_lock))
- if (!out_of_memory(&oc)) {
- /*
- * There shouldn't be any user tasks runnable while the
- * OOM killer is disabled, so the current task has to
- * be a racing OOM victim for which oom_killer_disable()
- * is waiting for.
- */
- WARN_ON(test_thread_flag(TIF_MEMDIE));
- }
+ out_of_memory(&oc);