]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cgroup/rstat: Fix forceidle time in cpu.stat
authorAbel Wu <wuyun.abel@bytedance.com>
Sun, 9 Feb 2025 06:13:11 +0000 (14:13 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:39:35 +0000 (14:39 +0200)
commit3501677651cac478826e83690ec3d19706fbf3cd
tree41083a5418bc6aa2c7610efb9bed5be2a8bd44e7
parent39bc1484eb0663c84b2ec72c2960b2e01ef99545
cgroup/rstat: Fix forceidle time in cpu.stat

[ Upstream commit c4af66a95aa3bc1d4f607ebd4eea524fb58946e3 ]

The commit b824766504e4 ("cgroup/rstat: add force idle show helper")
retrieves forceidle_time outside cgroup_rstat_lock for non-root cgroups
which can be potentially inconsistent with other stats.

Rather than reverting that commit, fix it in a way that retains the
effort of cleaning up the ifdef-messes.

Fixes: b824766504e4 ("cgroup/rstat: add force idle show helper")
Signed-off-by: Abel Wu <wuyun.abel@bytedance.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/cgroup/rstat.c