summaryrefslogtreecommitdiff
path: root/include/linux/rolling_buffer.h
diff options
context:
space:
mode:
authorzhidao su <suzhidao@xiaomi.com>2026-03-03 09:09:58 +0300
committerTejun Heo <tj@kernel.org>2026-03-03 11:00:02 +0300
commit3f27958b729a2337336a6b50e0d9aee5fbbce816 (patch)
treee284368b1e7f66ded01e3e0b138c096f5b450d8d /include/linux/rolling_buffer.h
parent494eaf4651975127d34d5ae6555c72dedba092c9 (diff)
downloadlinux-3f27958b729a2337336a6b50e0d9aee5fbbce816.tar.xz
sched_ext: Use READ_ONCE() for plain reads of scx_watchdog_timeout
scx_watchdog_timeout is written with WRITE_ONCE() in scx_enable(): WRITE_ONCE(scx_watchdog_timeout, timeout); However, three read-side accesses use plain reads without the matching READ_ONCE(): /* check_rq_for_timeouts() - L2824 */ last_runnable + scx_watchdog_timeout /* scx_watchdog_workfn() - L2852 */ scx_watchdog_timeout / 2 /* scx_enable() - L5179 */ scx_watchdog_timeout / 2 The KCSAN documentation requires that if one accessor uses WRITE_ONCE() to annotate lock-free access, all other accesses must also use the appropriate accessor. Plain reads alongside WRITE_ONCE() leave the pair incomplete and can trigger KCSAN warnings. Note that scx_tick() already uses the correct READ_ONCE() annotation: last_check + READ_ONCE(scx_watchdog_timeout) Fix the three remaining plain reads to match, making all accesses to scx_watchdog_timeout consistently annotated and KCSAN-clean. Signed-off-by: zhidao su <suzhidao@xiaomi.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux/rolling_buffer.h')
0 files changed, 0 insertions, 0 deletions