On 04/25, Sergey Dyasly wrote: > > But in general case there is still a race, Yes. Every while_each_thread() in oom-kill is wrong, and I am still not sure what should/can we do. Will try to think more. You know, partly this is the known problem. while_each_thread(g,t) is not safe lockless unless g is the main thread. And another bug is that even if it is the main thread it can race with exec. The 2nd problem should be fixed, but when we discussed this previously we were going to disallow the lockless while_each_thread(sub_thread)... And yes, I missed these problems when we discussed 6b0c81b3 :/ > Still, I think that fatal_signal_pending() is a sensible check, since the one > for current task is already there, and there is a patch from David Rientjes > that does almost the same [1]. Oh, I can't comment this. I leave this to you and David. Oleg. -- 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>