On Fri 05-12-14 17:41:47, Michal Hocko wrote: [...] > +bool oom_killer_disable(void) > +{ > + /* > + * Make sure to not race with an ongoing OOM killer > + * and that the current is not the victim. > + */ > + down_write(&oom_sem); > + if (test_thread_flag(TIF_MEMDIE)) { > + up_write(&oom_sem); > + return false; > + } > + > + oom_killer_disabled = true; > + up_write(&oom_sem); > + > + wait_event(oom_victims_wait, atomic_read(&oom_victims)); Ups brainfart... Should be !atomic_read(&oom_victims). Condition says for what we are waiting not when we are waiting. > + > + return true; > +} [...] -- Michal Hocko SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>