diff options
| author | Ren Tamura <ren.tamura.oss@gmail.com> | 2026-05-28 13:28:39 +0900 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2026-05-28 05:40:06 -1000 |
| commit | 336f87d742a616236006bb77275f79a3ac101637 (patch) | |
| tree | a0fc25cef8865b8a827c19c3fe203667ee39aedd /include/linux/processor.h | |
| parent | 98f0adb2284a0a4599a40337a30bef429167bb7b (diff) | |
cgroup: pair max limit READ_ONCE() with WRITE_ONCE()
cgroup.max.descendants and cgroup.max.depth are shown through seq_file.
Their show callbacks read cgrp->max_descendants and cgrp->max_depth with
READ_ONCE(), respectively.
The corresponding write callbacks update the same scalar fields while
holding the cgroup lock, but the seq_file show path does not serialize
against those stores. This leaves the lockless show-side loads annotated
with READ_ONCE(), while the corresponding stores remain plain stores.
Use WRITE_ONCE() for the updates so the intended lockless access is marked
consistently on both sides. This does not change locking, ordering, or
user-visible semantics.
Assisted-by: OpenAI-Codex:gpt-5.5
Signed-off-by: Ren Tamura <ren.tamura.oss@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux/processor.h')
0 files changed, 0 insertions, 0 deletions
