Skip to content

Commit

Permalink
rcu: Fix RCU lockdep splat on freezer_fork path
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
paulmck authored and Ingo Molnar committed Apr 30, 2010
1 parent 8b08ca5 commit 8b46f88
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion kernel/cgroup_freezer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8b46f88

Please sign in to comment.