diff options
| author | Peter Zijlstra <peterz@infradead.org> | 2021-06-17 20:57:19 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-07-14 16:59:38 +0200 |
| commit | 71f62a792beae1daa0bfa1be1118b4c482410261 (patch) | |
| tree | 64436100b1c408e9159d143bfa837631707559d8 /lib | |
| parent | 5f9ae99d91f196016d67e3f66ec8f99401d9637c (diff) | |
lockdep/selftests: Fix selftests vs PROVE_RAW_LOCK_NESTING
[ Upstream commit c0c2c0dad6a06e0c05e9a52d65f932bd54364c97 ]
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: de8f5e4f2dc1 ("lockdep: Introduce wait-type checks")
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Joerg Roedel <jroedel@suse.de>
Link: https://lore.kernel.org/r/20210617190313.322096283@infradead.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/locking-selftest.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/locking-selftest.c b/lib/locking-selftest.c index 2d85abac1744..0f6b262e0964 100644 --- a/lib/locking-selftest.c +++ b/lib/locking-selftest.c @@ -194,6 +194,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() \ |
