]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
cgroup: Annotate unlocked nr_populated_* accesses with READ_ONCE/WRITE_ONCE
authorTejun Heo <tj@kernel.org>
Tue, 5 May 2026 00:51:18 +0000 (14:51 -1000)
committerTejun Heo <tj@kernel.org>
Fri, 15 May 2026 17:24:22 +0000 (07:24 -1000)
commit44fabf05634ce9e90b3fb179ea962995b7bbaa09
treead5d5b33088a5f2d6b8965ea86e0c0a4ac4cc557
parent3360a5c16d87933fb74b530f5e016eb3dfffee5d
cgroup: Annotate unlocked nr_populated_* accesses with READ_ONCE/WRITE_ONCE

cgroup_update_populated() updates nr_populated_csets,
nr_populated_domain_children, and nr_populated_threaded_children under
css_set_lock, but cgroup_has_tasks(), cgroup_is_populated(), and
cgroup_can_be_thread_root() read them without holding it. Use
READ_ONCE/WRITE_ONCE.

Signed-off-by: Tejun Heo <tj@kernel.org>
include/linux/cgroup.h
kernel/cgroup/cgroup.c