提交 52cf373c 编写于 作者: L Lucas Stach 提交者: Tejun Heo

cgroup: properly init u64_stats

Lockdep complains that the stats update is trying to register a non-static
key. This is because u64_stats are using a seqlock on 32bit arches, which
needs to be initialized before usage.

Fixes: 041cd640 (cgroup: Implement cgroup2 basic CPU usage accounting)
Signed-off-by: NLucas Stach <l.stach@pengutronix.de>
Signed-off-by: NTejun Heo <tj@kernel.org>
上级 ddf7005f
......@@ -296,8 +296,12 @@ int cgroup_stat_init(struct cgroup *cgrp)
}
/* ->updated_children list is self terminated */
for_each_possible_cpu(cpu)
cgroup_cpu_stat(cgrp, cpu)->updated_children = cgrp;
for_each_possible_cpu(cpu) {
struct cgroup_cpu_stat *cstat = cgroup_cpu_stat(cgrp, cpu);
cstat->updated_children = cgrp;
u64_stats_init(&cstat->sync);
}
prev_cputime_init(&cgrp->stat.prev_cputime);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册