Commit eb178d06 authored by Tejun Heo's avatar Tejun Heo

cgroup: grab cgroup_mutex in drop_parsed_module_refcounts()

This isn't strictly necessary as all subsystems specified in
@subsys_mask are guaranteed to be pinned; however, it does spuriously
trigger lockdep warning.  Let's grab cgroup_mutex around it.
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Acked-by: default avatarLi Zefan <lizefan@huawei.com>
parent 1672d040
...@@ -1325,11 +1325,11 @@ static void drop_parsed_module_refcounts(unsigned long subsys_mask) ...@@ -1325,11 +1325,11 @@ static void drop_parsed_module_refcounts(unsigned long subsys_mask)
struct cgroup_subsys *ss; struct cgroup_subsys *ss;
int i; int i;
for_each_subsys(ss, i) { mutex_lock(&cgroup_mutex);
if (!(subsys_mask & (1UL << i))) for_each_subsys(ss, i)
continue; if (subsys_mask & (1UL << i))
module_put(cgroup_subsys[i]->module); module_put(cgroup_subsys[i]->module);
} mutex_unlock(&cgroup_mutex);
} }
static int cgroup_remount(struct super_block *sb, int *flags, char *data) static int cgroup_remount(struct super_block *sb, int *flags, char *data)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment