diff options
author | Li Zefan <lizefan@huawei.com> | 2013-01-24 14:43:28 +0800 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2013-03-06 03:24:02 +0000 |
commit | d6f179e6f4e2dd693f848bb4e06176a01a6553ab (patch) | |
tree | 348d4b737e9c1a53f7a890202bcd6690b0a44f5a /kernel/Kconfig.hz | |
parent | a6a26fe018f2e369692ba098c02d51728acb14e8 (diff) |
cgroup: fix exit() vs rmdir() race
commit 71b5707e119653039e6e95213f00479668c79b75 upstream.
In cgroup_exit() put_css_set_taskexit() is called without any lock,
which might lead to accessing a freed cgroup:
thread1 thread2
---------------------------------------------
exit()
cgroup_exit()
put_css_set_taskexit()
atomic_dec(cgrp->count);
rmdir();
/* not safe !! */
check_for_release(cgrp);
rcu_read_lock() can be used to make sure the cgroup is alive.
Signed-off-by: Li Zefan <lizefan@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'kernel/Kconfig.hz')
0 files changed, 0 insertions, 0 deletions