On Tue 07-06-16 01:20:08, Oleg Nesterov wrote: > On 06/06, David Rientjes wrote: > > > > > There is a potential race where we kill the oom disabled task which is > > > highly unlikely but possible. It would happen if __set_oom_adj raced > > > with select_bad_process and then it is OK to consider the old value or > > > with fork when it should be acceptable as well. > > > Let's add a little note to the log so that people would tell us that > > > this really happens in the real life and it matters. > > > > > > > We cannot kill oom disabled processes at all, little race or otherwise. > > But this change doesn't really make it worse?
Exactly, the race was always there. We could mitigate it to some degree by (ab)using oom_lock in __set_oom_adj. But I guess this is just an overkill. -- Michal Hocko SUSE Labs