All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC 0/9] Fix data races on hrtimer_sleeper ->task field
@ 2026-07-31  0:39 Paul E. McKenney
  2026-07-31  0:40 ` [PATCH RFC 1/9] hrtimer: Mark data-racy accesses to " Paul E. McKenney
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Paul E. McKenney @ 2026-07-31  0:39 UTC (permalink / raw)
  To: Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner
  Cc: Peter Zijlstra (Intel), linux-kernel

Hello!

In CONFIG_KCSAN_STRICT=y mode, KCSAN finds data races on the
hrtimer_sleeper structure's ->task field.  This field is used to indicate
owner of this structure, and also to signal the sleeper that the sleep
is over through use of a store of NULL.

Because access to the ->task field is open-coded across several kernel
subsystems, this series creates accessor functions creatively named
hrtimer_sleeper_task_get() and hrtimer_sleeper_task_set(), and uses
these throughout.

A key goal of this and similar serieses is to reduce KCSAN noise in
strict mode so that new data races are more visible.

The series is as follows:

1.	hrtimer: Mark data-racy accesses to hrtimer_sleeper ->task field.

2.	aio: Use accessor for hrtimer_sleeper ->task field.

3.	wait: Use accessor for hrtimer_sleeper ->task field.

4.	io-uring: Use accessor for hrtimer_sleeper ->task field.

5.	futex: Use accessor for hrtimer_sleeper ->task field in waitwake.c.

6.	timers: Use accessor for hrtimer_sleeper ->task field in
	sleep_timeout.c.

7.	net: pktgen: Use accessor for hrtimer_sleeper ->task field.

8.	rtmutex: Use accessor for hrtimer_sleeper ->task field.

9.	futex: Use accessor for hrtimer_sleeper ->task field in requeue.

						Thanx, Paul

------------------------------------------------------------------------

 fs/aio.c                    |    2 +-
 include/linux/hrtimer.h     |    8 ++++++++
 include/linux/wait.h        |    2 +-
 io_uring/rw.c               |    2 +-
 kernel/futex/requeue.c      |    2 +-
 kernel/futex/waitwake.c     |    8 ++++----
 kernel/locking/rtmutex.c    |    2 +-
 kernel/time/hrtimer.c       |   14 +++++++-------
 kernel/time/sleep_timeout.c |    4 ++--
 net/core/pktgen.c           |    4 ++--
 10 files changed, 28 insertions(+), 20 deletions(-)

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-07-31  0:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-31  0:39 [PATCH RFC 0/9] Fix data races on hrtimer_sleeper ->task field Paul E. McKenney
2026-07-31  0:40 ` [PATCH RFC 1/9] hrtimer: Mark data-racy accesses to " Paul E. McKenney
2026-07-31  0:40 ` [PATCH RFC 2/9] aio: Use accessor for " Paul E. McKenney
2026-07-31  0:40 ` [PATCH RFC 3/9] wait: " Paul E. McKenney
2026-07-31  0:40 ` [PATCH RFC 4/9] io-uring/rw: " Paul E. McKenney
2026-07-31  0:40 ` [PATCH RFC 5/9] futex: Use accessor for hrtimer_sleeper ->task field in waitwake.c Paul E. McKenney
2026-07-31  0:40 ` [PATCH RFC 6/9] timers: Use accessor for hrtimer_sleeper ->task field in sleep_timeout.c Paul E. McKenney
2026-07-31  0:40 ` [PATCH RFC 7/9] net: pktgen: Use accessor for hrtimer_sleeper ->task field Paul E. McKenney
2026-07-31  0:40 ` [PATCH RFC 8/9] rtmutex: " Paul E. McKenney
2026-07-31  0:40 ` [PATCH RFC 9/9] futex: Use accessor for hrtimer_sleeper ->task field in requeue Paul E. McKenney

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.