cgroup: Fix an RCU warning in cgroup_path()
authorLi Zefan <lizf@cn.fujitsu.com>
Thu, 22 Apr 2010 09:29:24 +0000 (17:29 +0800)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Tue, 4 May 2010 16:24:59 +0000 (09:24 -0700)
commit9a9686b634acc5cb6b7c601c171ae64af0318a24
tree4a8431117018d8883c6d34d5c06f2eff99dcfed6
parente35ec2d2c1fc45dd3e46dde74bb0c4c4366125bf
cgroup: Fix an RCU warning in cgroup_path()

with CONFIG_PROVE_RCU=y, a warning can be triggered:

  # mount -t cgroup -o debug xxx /mnt
  # cat /proc/$$/cgroup

...
kernel/cgroup.c:1649 invoked rcu_dereference_check() without protection!
...

This is a false-positive, because cgroup_path() can be called
with either rcu_read_lock() held or cgroup_mutex held.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/cgroup.c