From: Li Zefan Date: Tue, 5 Mar 2013 02:57:03 +0000 (+0800) Subject: cgroup: avoid accessing modular cgroup subsys structure without locking X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~124^2~41 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7d8e0bf56a66bab08d2f316dd87e56c08cecb899;p=pandora-kernel.git 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 Signed-off-by: Tejun Heo --- Reading git-diff-tree failed