diff options
author | Li Zefan <lizefan@huawei.com> | 2013-03-05 10:57:03 +0800 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2013-03-05 09:33:25 -0800 |
commit | 7d8e0bf56a66bab08d2f316dd87e56c08cecb899 (patch) | |
tree | be35c2daec953f0c98241c16311879dd45bc4859 /include/linux/mpi.h | |
parent | f50daa704f36a6544a902c52b6cf37b0493dfc5d (diff) | |
download | op-kernel-dev-7d8e0bf56a66bab08d2f316dd87e56c08cecb899.zip op-kernel-dev-7d8e0bf56a66bab08d2f316dd87e56c08cecb899.tar.gz |
cgroup: avoid accessing modular cgroup subsys structure without locking
subsys[i] is set to NULL in cgroup_unload_subsys() at modular unload,
and that's protected by cgroup_mutex, and then the memory *subsys[i]
resides will be freed.
So this is unsafe without any locking:
if (!ss || ss->module)
...
v2:
- add a comment for enum cgroup_subsys_id
- simplify the comment in cgroup_exit()
Signed-off-by: Li Zefan <lizefan@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux/mpi.h')
0 files changed, 0 insertions, 0 deletions