Re: [PATCH] cgroup: missing rcu read lock around task_css_set

2014-03-27 Thread Li Zefan
On 2014/3/27 23:35, Sasha Levin wrote: > On 03/04/2014 07:57 PM, Li Zefan wrote: >> On 2014/3/5 3:47, Tejun Heo wrote: >>> On Tue, Mar 04, 2014 at 12:20:45PM -0500, Sasha Levin wrote: > Hrm... there is a PF_EXITING check there already: > > #define task_css_set_check(task, __c)

Re: [PATCH] cgroup: missing rcu read lock around task_css_set

2014-03-27 Thread Sasha Levin
On 03/04/2014 07:57 PM, Li Zefan wrote: On 2014/3/5 3:47, Tejun Heo wrote: On Tue, Mar 04, 2014 at 12:20:45PM -0500, Sasha Levin wrote: Hrm... there is a PF_EXITING check there already: #define task_css_set_check(task, __c)\ rcu_dereference_check((task)->cgroups,

Re: [PATCH] cgroup: missing rcu read lock around task_css_set

2014-03-04 Thread Li Zefan
On 2014/3/5 3:47, Tejun Heo wrote: > On Tue, Mar 04, 2014 at 12:20:45PM -0500, Sasha Levin wrote: >>> Hrm... there is a PF_EXITING check there already: >>> >>> #define task_css_set_check(task, __c)\ >>> rcu_dereference_check((task)->cgroups,\ >>> lockdep_is_h

Re: [PATCH] cgroup: missing rcu read lock around task_css_set

2014-03-04 Thread Tejun Heo
On Tue, Mar 04, 2014 at 12:20:45PM -0500, Sasha Levin wrote: > >Hrm... there is a PF_EXITING check there already: > > > > #define task_css_set_check(task, __c)\ > > rcu_dereference_check((task)->cgroups,\ > > lockdep_is_held(&cgroup_mutex) ||\ > >

Re: [PATCH] cgroup: missing rcu read lock around task_css_set

2014-03-04 Thread Sasha Levin
On 03/03/2014 06:00 PM, Sasha Levin wrote: On 03/03/2014 05:45 PM, Tejun Heo wrote: On Mon, Mar 03, 2014 at 05:43:11PM -0500, Sasha Levin wrote: On 03/03/2014 05:33 PM, Tejun Heo wrote: On Sat, Mar 01, 2014 at 10:00:11PM -0500, Sasha Levin wrote: rcu read lock should be held when calling and

Re: [PATCH] cgroup: missing rcu read lock around task_css_set

2014-03-03 Thread Sasha Levin
On 03/03/2014 05:45 PM, Tejun Heo wrote: On Mon, Mar 03, 2014 at 05:43:11PM -0500, Sasha Levin wrote: On 03/03/2014 05:33 PM, Tejun Heo wrote: On Sat, Mar 01, 2014 at 10:00:11PM -0500, Sasha Levin wrote: rcu read lock should be held when calling and working with task_css_set. This patch also

Re: [PATCH] cgroup: missing rcu read lock around task_css_set

2014-03-03 Thread Sasha Levin
On 03/03/2014 05:45 PM, Tejun Heo wrote: On Mon, Mar 03, 2014 at 05:43:11PM -0500, Sasha Levin wrote: On 03/03/2014 05:33 PM, Tejun Heo wrote: On Sat, Mar 01, 2014 at 10:00:11PM -0500, Sasha Levin wrote: rcu read lock should be held when calling and working with task_css_set. This patch also

Re: [PATCH] cgroup: missing rcu read lock around task_css_set

2014-03-03 Thread Tejun Heo
On Mon, Mar 03, 2014 at 05:43:11PM -0500, Sasha Levin wrote: > On 03/03/2014 05:33 PM, Tejun Heo wrote: > >On Sat, Mar 01, 2014 at 10:00:11PM -0500, Sasha Levin wrote: > >>rcu read lock should be held when calling and working with task_css_set. > >> > >>This patch also fixes a related lockdep warni

Re: [PATCH] cgroup: missing rcu read lock around task_css_set

2014-03-03 Thread Sasha Levin
On 03/03/2014 05:33 PM, Tejun Heo wrote: On Sat, Mar 01, 2014 at 10:00:11PM -0500, Sasha Levin wrote: rcu read lock should be held when calling and working with task_css_set. This patch also fixes a related lockdep warning. Hmmm... PF_EXITING should be visible at that point and cset can't cha

Re: [PATCH] cgroup: missing rcu read lock around task_css_set

2014-03-03 Thread Tejun Heo
On Sat, Mar 01, 2014 at 10:00:11PM -0500, Sasha Levin wrote: > rcu read lock should be held when calling and working with task_css_set. > > This patch also fixes a related lockdep warning. Hmmm... PF_EXITING should be visible at that point and cset can't change anymore. We prolly need to update

[PATCH] cgroup: missing rcu read lock around task_css_set

2014-03-01 Thread Sasha Levin
rcu read lock should be held when calling and working with task_css_set. This patch also fixes a related lockdep warning. Signed-off-by: Sasha Levin --- kernel/cgroup.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 8f4ddbe..f63