[PATCH 1/3] lockdep: Fix wait-type for empty stack

From: Peter Zijlstra
Date: Thu Jun 17 2021 - 15:04:01 EST


Even the very first lock can violate the wait-context check, consider
the various IRQ contexts.

Fixes: de8f5e4f2dc1 ("lockdep: Introduce wait-type checks")
Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
---
kernel/locking/lockdep.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -4577,7 +4577,7 @@ static int check_wait_context(struct tas
u8 curr_inner;
int depth;

- if (!curr->lockdep_depth || !next_inner || next->trylock)
+ if (!next_inner || next->trylock)
return 0;

if (!next_outer)