diff options
author | Paul E. McKenney <[email protected]> | 2010-04-21 13:02:08 -0700 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2010-04-30 12:03:17 +0200 |
commit | 8b46f880841aac821af8efa6581bb0e46b8b9845 (patch) | |
tree | 4172415abf0f8cbbdd7367023cf521e7a56b9a3a | |
parent | 8b08ca52f5942c21564bbb90ccfb61053f2c26a1 (diff) |
rcu: Fix RCU lockdep splat on freezer_fork path
Add an RCU read-side critical section to suppress this false
positive.
Located-by: Eric Paris <[email protected]>
Signed-off-by: Paul E. McKenney <[email protected]>
Acked-by: Li Zefan <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
-rw-r--r-- | kernel/cgroup_freezer.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/cgroup_freezer.c b/kernel/cgroup_freezer.c index da5e13975531..e5c0244962b0 100644 --- a/kernel/cgroup_freezer.c +++ b/kernel/cgroup_freezer.c @@ -205,9 +205,12 @@ static void freezer_fork(struct cgroup_subsys *ss, struct task_struct *task) * No lock is needed, since the task isn't on tasklist yet, * so it can't be moved to another cgroup, which means the * freezer won't be removed and will be valid during this - * function call. + * function call. Nevertheless, apply RCU read-side critical + * section to suppress RCU lockdep false positives. */ + rcu_read_lock(); freezer = task_freezer(task); + rcu_read_unlock(); /* * The root cgroup is non-freezable, so we can skip the |