Re: [PATCH] cgroup: fix lockdep warning for event_control

2012-11-28 Thread Greg Thelen
On Wed, Nov 28 2012, Tejun Heo wrote: > Hello, Greg. > > On Wed, Nov 28, 2012 at 12:15:42PM -0800, Greg Thelen wrote: >> @@ -4276,6 +4276,7 @@ static int cgroup_destroy_locked(struct cgroup *cgrp) >> DEFINE_WAIT(wait); >> struct cgroup_event *event, *tmp; >> struct cgroup_subsys *ss

Re: [PATCH] cgroup: fix lockdep warning for event_control

2012-11-28 Thread Tejun Heo
Hello, Greg. On Wed, Nov 28, 2012 at 12:15:42PM -0800, Greg Thelen wrote: > @@ -4276,6 +4276,7 @@ static int cgroup_destroy_locked(struct cgroup *cgrp) > DEFINE_WAIT(wait); > struct cgroup_event *event, *tmp; > struct cgroup_subsys *ss; > + struct list_head tmp_list; LIST_HE

[PATCH] cgroup: fix lockdep warning for event_control

2012-11-28 Thread Greg Thelen
The cgroup_event_wake() function is called with the wait queue head locked and it takes cgrp->event_list_lock. However, in cgroup_rmdir() remove_wait_queue() was being called after taking cgrp->event_list_lock. Correct the lock ordering by using a temporary list to obtain the event list to remove