locking/rtmutex: Add a lockdep assert to catch potential nested blocking
authorThomas Gleixner <tglx@linutronix.de>
Fri, 8 Sep 2023 16:22:53 +0000 (18:22 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Wed, 20 Sep 2023 07:31:14 +0000 (09:31 +0200)
commit45f67f30a22f264bc7a0a61255c2ee1a838e9403
treecea2fb874c26c17d8f75c5957ce2cdaadce24e69
parentd14f9e930b9073de264c106bf04968286ef9b3a4
locking/rtmutex: Add a lockdep assert to catch potential nested blocking

There used to be a BUG_ON(current->pi_blocked_on) in the lock acquisition
functions, but that vanished in one of the rtmutex overhauls.

Bring it back in form of a lockdep assert to catch code paths which take
rtmutex based locks with current::pi_blocked_on != NULL.

Reported-by: Crystal Wood <swood@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: "Peter Zijlstra (Intel)" <peterz@infradead.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20230908162254.999499-7-bigeasy@linutronix.de
kernel/locking/rtmutex.c
kernel/locking/rwbase_rt.c
kernel/locking/spinlock_rt.c