Files
linux-stable-mirror/include/linux/rwlock_rt.h
Sebastian Andrzej Siewior 92848c5f80 locking/rt: Add sparse annotation PREEMPT_RT's sleeping locks.
[ Upstream commit 52e0874fc1 ]

The sleeping locks on PREEMPT_RT (rt_spin_lock() and friends) lack
sparse annotation. Therefore a missing spin_unlock() won't be spotted by
sparse in a PREEMPT_RT build while it is noticed on a !PREEMPT_RT build.

Add the __acquires/__releases macros to the lock/ unlock functions. The
trylock functions already use the __cond_lock() wrapper.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20240812104200.2239232-2-bigeasy@linutronix.de
Stable-dep-of: 5c2e7736e2 ("rust: helpers: Avoid raw_spin_lock initialization for PREEMPT_RT")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-12-05 14:01:23 +01:00

3.4 KiB