Paul E. McKenney d31e31365b srcu: Force synchronization for srcu_get_delay()
Currently, srcu_get_delay() can be called concurrently, for example,
by a CPU that is the first to request a new grace period and the CPU
processing the current grace period.  Although concurrent access is
harmless, it unnecessarily expands the state space.  Additionally,
all calls to srcu_get_delay() are from slow paths.

This commit therefore protects all calls to srcu_get_delay() with
ssp->srcu_sup->lock, which is already held on the invocation from the
srcu_funnel_gp_start() function.  While in the area, this commit also
adds a lockdep_assert_held() to srcu_get_delay() itself.

Reported-by: syzbot+16a19b06125a2963eaee@syzkaller.appspotmail.com
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Kent Overstreet <kent.overstreet@linux.dev>
Cc: <bpf@vger.kernel.org>
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
2025-02-05 07:12:05 -08:00
..
2025-01-29 10:35:40 -08:00
2025-01-21 16:09:47 -08:00
2025-01-25 08:22:26 +00:00
2025-01-21 13:51:07 -08:00
2025-01-31 12:07:07 -08:00
2025-01-21 20:03:04 -08:00
2025-01-31 12:07:07 -08:00
2024-11-03 01:28:06 -05:00
2025-01-19 12:44:28 +08:00
2024-09-27 08:18:43 -07:00
2025-01-28 11:34:03 -08:00
2024-11-03 01:28:06 -05:00