Messages in this thread |  | | Date | Wed, 4 Dec 2013 16:41:39 -0800 (PST) | From | David Rientjes <> | Subject | Re: [PATCH v2 3/4] oom_kill: has_intersects_mems_allowed() needs rcu_read_lock() |
| |
On Wed, 4 Dec 2013, Oleg Nesterov wrote:
> At least out_of_memory() calls has_intersects_mems_allowed() > without even rcu_read_lock(), this is obviously buggy. > > Add the necessary rcu_read_lock(). This means that we can not > simply return from the loop, we need "bool ret" and "break". > > While at it, swap the names of task_struct's (the argument and > the local). This cleanups the code a little bit and avoids the > unnecessary initialization. > > 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>
|  |