Re: [PATCH v2 4/4] oom_kill: add rcu_read_lock() into find_lock_task_mm()

2013-12-04 Thread David Rientjes
On Wed, 4 Dec 2013, Oleg Nesterov wrote: > find_lock_task_mm() expects it is called under rcu or tasklist lock, > but it seems that at least oom_unkillable_task()->task_in_mem_cgroup() > and mem_cgroup_out_of_memory()->oom_badness() can call it lockless. > > Perhaps we could fix the callers, but

Re: [PATCH v2 4/4] oom_kill: add rcu_read_lock() into find_lock_task_mm()

2013-12-04 Thread Michal Hocko
On Wed 04-12-13 14:04:20, Oleg Nesterov wrote: > find_lock_task_mm() expects it is called under rcu or tasklist lock, > but it seems that at least oom_unkillable_task()->task_in_mem_cgroup() > and mem_cgroup_out_of_memory()->oom_badness() can call it lockless. > > Perhaps we could fix the

[PATCH v2 4/4] oom_kill: add rcu_read_lock() into find_lock_task_mm()

2013-12-04 Thread Oleg Nesterov
find_lock_task_mm() expects it is called under rcu or tasklist lock, but it seems that at least oom_unkillable_task()->task_in_mem_cgroup() and mem_cgroup_out_of_memory()->oom_badness() can call it lockless. Perhaps we could fix the callers, but this patch simply adds rcu lock into

[PATCH v2 4/4] oom_kill: add rcu_read_lock() into find_lock_task_mm()

2013-12-04 Thread Oleg Nesterov
find_lock_task_mm() expects it is called under rcu or tasklist lock, but it seems that at least oom_unkillable_task()-task_in_mem_cgroup() and mem_cgroup_out_of_memory()-oom_badness() can call it lockless. Perhaps we could fix the callers, but this patch simply adds rcu lock into

Re: [PATCH v2 4/4] oom_kill: add rcu_read_lock() into find_lock_task_mm()

2013-12-04 Thread Michal Hocko
On Wed 04-12-13 14:04:20, Oleg Nesterov wrote: find_lock_task_mm() expects it is called under rcu or tasklist lock, but it seems that at least oom_unkillable_task()-task_in_mem_cgroup() and mem_cgroup_out_of_memory()-oom_badness() can call it lockless. Perhaps we could fix the callers, but

Re: [PATCH v2 4/4] oom_kill: add rcu_read_lock() into find_lock_task_mm()

2013-12-04 Thread David Rientjes
On Wed, 4 Dec 2013, Oleg Nesterov wrote: find_lock_task_mm() expects it is called under rcu or tasklist lock, but it seems that at least oom_unkillable_task()-task_in_mem_cgroup() and mem_cgroup_out_of_memory()-oom_badness() can call it lockless. Perhaps we could fix the callers, but this