Skip to content

Commit

Permalink
lockdep/selftests: Fix selftests vs PROVE_RAW_LOCK_NESTING
Browse files Browse the repository at this point in the history
When PROVE_RAW_LOCK_NESTING=y many of the selftests FAILED because
HARDIRQ context is out-of-bounds for spinlocks. Instead make the
default hardware context the threaded hardirq context, which preserves
the old locking rules.

The wait-type specific locking selftests will have a non-threaded
HARDIRQ variant.

Fixes: de8f5e4 ("lockdep: Introduce wait-type checks")
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Tested-by: Joerg Roedel <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
Peter Zijlstra committed Jun 22, 2021
1 parent f8b298c commit c0c2c0d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/locking-selftest.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ static void init_shared_classes(void)
#define HARDIRQ_ENTER() \
local_irq_disable(); \
__irq_enter(); \
lockdep_hardirq_threaded(); \
WARN_ON(!in_irq());

#define HARDIRQ_EXIT() \
Expand Down

0 comments on commit c0c2c0d

Please sign in to comment.