Hello, Li.
On Fri, Mar 01, 2013 at 03:06:36PM +0800, Li Zefan wrote:
> /* Define the enumeration of all builtin cgroup subsystems */
> #define SUBSYS(_x) _x ## _subsys_id,
> -#define IS_SUBSYS_ENABLED(option) IS_ENABLED(option)
> enum cgroup_subsys_id {
> +#define IS_SUBSYS_ENABLED(option) IS_B
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)
...
Signed-off-by: Li Zefan
---
include/linux/cgroup.h | 11 ++
2 matches
Mail list logo