summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2014-02-08 10:26:34 -0500
committerTejun Heo <tj@kernel.org>2014-02-08 10:26:34 -0500
commit48573a893303986e3b0b2974d6fb11f3d1bb7064 (patch)
treea01edf5728485e7637a25b08020f210a3ae0d67e /mm
parentb58c89986a77a23658682a100eb15d8edb571ebb (diff)
downloadlinux-stable-48573a893303986e3b0b2974d6fb11f3d1bb7064.tar.gz
linux-stable-48573a893303986e3b0b2974d6fb11f3d1bb7064.tar.bz2
linux-stable-48573a893303986e3b0b2974d6fb11f3d1bb7064.zip
cgroup: fix locking in cgroup_cfts_commit()
cgroup_cfts_commit() walks the cgroup hierarchy that the target subsystem is attached to and tries to apply the file changes. Due to the convolution with inode locking, it can't keep cgroup_mutex locked while iterating. It currently holds only RCU read lock around the actual iteration and then pins the found cgroup using dget(). Unfortunately, this is incorrect. Although the iteration does check cgroup_is_dead() before invoking dget(), there's nothing which prevents the dentry from going away inbetween. Note that this is different from the usual css iterations where css_tryget() is used to pin the css - css_tryget() tests whether the css can be pinned and fails if not. The problem can be solved by simply holding cgroup_mutex instead of RCU read lock around the iteration, which actually reduces LOC. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Li Zefan <lizefan@huawei.com> Cc: stable@vger.kernel.org
Diffstat (limited to 'mm')
0 files changed, 0 insertions, 0 deletions