cgroup: fix lockdep warning for event_control
authorGreg Thelen <gthelen@google.com>
Wed, 28 Nov 2012 21:50:44 +0000 (13:50 -0800)
committerTejun Heo <tj@kernel.org>
Wed, 28 Nov 2012 21:51:56 +0000 (13:51 -0800)
commit205a872bd6f9a9a09ef035ef1e90185a8245cc58
tree9b39a5823dddf6319a021d4ab36c7cd35f612908
parentfddfb02ad0d0d3b479c2a26a8ae7e6411b34706b
cgroup: fix lockdep warning for event_control

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 from the wait queue.

Signed-off-by: Greg Thelen <gthelen@google.com>
Signed-off-by: Aaron Durbin <adurbin@google.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup.c