summaryrefslogtreecommitdiff
path: root/rust/helpers/spinlock.c
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2024-08-12 12:39:02 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-12-05 14:01:23 +0100
commit92848c5f8057c963dda3fe9b80ba785d1a4852e5 (patch)
tree36b6c51636619fa306e5e1b572dddd54497e9b66 /rust/helpers/spinlock.c
parent09162013082267af54bb39091b523a8daaa28955 (diff)
locking/rt: Add sparse annotation PREEMPT_RT's sleeping locks.
[ Upstream commit 52e0874fc16bd26e9ea1871e30ffb2c6dff187cf ] 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: 5c2e7736e20d ("rust: helpers: Avoid raw_spin_lock initialization for PREEMPT_RT") Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'rust/helpers/spinlock.c')
0 files changed, 0 insertions, 0 deletions