Messages in this thread |  | | Date | Wed, 4 Dec 2013 16:39:06 -0800 (PST) | From | David Rientjes <> | Subject | Re: [PATCH v2 2/4] oom_kill: change oom_kill.c to use for_each_thread() |
| |
On Wed, 4 Dec 2013, Oleg Nesterov wrote:
> Change oom_kill.c to use for_each_thread() rather than the racy > while_each_thread() which can loop forever if we race with exit. > > Note also that most users were buggy even if while_each_thread() > was fine, the task can exit even _before_ rcu_read_lock(). > > Fortunately the new for_each_thread() only requires the stable > task_struct, so this change fixes both problems. > > Signed-off-by: Oleg Nesterov <oleg@redhat.com> > Reviewed-and-Tested-by: Sergey Dyasly <dserrg@gmail.com> > Reviewed-by: Sameer Nanda <snanda@chromium.org>
Acked-by: David Rientjes <rientjes@google.com>
|  |