lkml.org 
[lkml]   [2013]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] cgroup: avoid accessing modular cgroup subsys structure without locking
On Tue, Mar 05, 2013 at 10:57:03AM +0800, Li Zefan wrote:
> 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>

Applied to cgroup/for-3.10.

Thanks.

--
tejun


\
 
 \ /
  Last update: 2013-03-05 19:01    [W:0.042 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site