[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130626010521.GE30407@mtj.dyndns.org>
Date: Tue, 25 Jun 2013 18:05:21 -0700
From: Tejun Heo <tj@...nel.org>
To: Sasha Levin <sasha.levin@...cle.com>
Cc: lizefan@...wei.com, LKML <linux-kernel@...r.kernel.org>,
cgroups@...r.kernel.org, trinity@...r.kernel.org
Subject: [PATCH cgroup/for-3.11] 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: Tejun Heo <tj@...nel.org>
---
kernel/cgroup.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -1325,11 +1325,11 @@ static void drop_parsed_module_refcounts
struct cgroup_subsys *ss;
int i;
- for_each_subsys(ss, i) {
- if (!(subsys_mask & (1UL << i)))
- continue;
- module_put(cgroup_subsys[i]->module);
- }
+ mutex_lock(&cgroup_mutex);
+ for_each_subsys(ss, i)
+ if (subsys_mask & (1UL << i))
+ module_put(cgroup_subsys[i]->module);
+ mutex_unlock(&cgroup_mutex);
}
static int cgroup_remount(struct super_block *sb, int *flags, char *data)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists