diff options
| author | Paul E. McKenney <paulmck@kernel.org> | 2026-09-18 17:14:17 -0700 |
|---|---|---|
| committer | Thomas Gleixner <tglx@kernel.org> | 2026-09-29 21:02:51 +0200 |
| commit | d166a1cd901615280be050929e5a5c9e4d300a62 (patch) | |
| tree | d9de8eaf031e3699e1bebf92cf62f71ae75e37ff /scripts/Makefile.thinlto | |
| parent | 7b07d15ed1d78cb49309754a2d14dacdddb058c7 (diff) | |
| download | linux-d166a1cd901615280be050929e5a5c9e4d300a62.tar.gz linux-d166a1cd901615280be050929e5a5c9e4d300a62.zip | |
hrtimer: Mark data-racy accesses to hrtimer_sleeper ->task field
The hrtimer_sleeper structure's ->task field is used as a flag to indicate
that the associated hrtimer has expired. This means that the hrtimer
handler can be storing to this field while other code is loading from it
to check for expiry. Note that additional races appear for hrtimers that
can be restarted, which could be argued to be a user error. However,
that is no reason to let the compiler introduce additional confusion.
Therefore, mark data-racy accesses to the hrtimer_sleeper ->task field
using READ_ONCE() (using a new hrtimer_sleeper_task_get() access function)
and WRITE_ONCE() (using a new hrtimer_sleeper_task_set() access function).
KCSAN located this issue.
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: Dmitry Ilvokhin <d@ilvokhin.com>
Link: https://patch.msgid.link/20260919001428.3133388-1-paulmck@kernel.org
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
