Skip to content
Commit 0da6a4f5 authored by Sebastian Andrzej Siewior's avatar Sebastian Andrzej Siewior Committed by Bruce Ashfield
Browse files

lockdep/selftests: Unbalanced migrate_disable() & rcu_read_lock()



The tests with unbalanced lock() + unlock() operation leave a modified
preemption counter behind which is then reset to its original value
after the test.

The spin_lock() function on PREEMPT_RT does not include a
preempt_disable() statement but migrate_disable() and read_rcu_lock().
As a consequence both counter never get back to their original value and
system explodes later after the selftest.
In the double-unlock case on PREEMPT_RT, the migrate_disable() and RCU
code will trigger which should be avoided. These counter should not be
decremented below their initial value.

Save both counters and bring them back to their original value after the
test.
In the double-unlock case, increment both counter in advance to they
become balanced after the double unlock.

Signed-off-by: default avatarSebastian Andrzej Siewior <bigeasy@linutronix.de>
parent b29dc4a9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment