summaryrefslogtreecommitdiff
path: root/kernel/locking/lockdep.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2021-06-17 20:57:18 +0200
committerPeter Zijlstra <peterz@infradead.org>2021-06-22 16:42:08 +0200
commitf8b298cc39f0619544c607eaef09fd0b2afd10f3 (patch)
treee50196d9eeaab1501eb66ece492b6289b39e5f84 /kernel/locking/lockdep.c
parent8946ccc25ed22d957ca7f0b6fac1dcf6d25eaf1f (diff)
lockdep: Fix wait-type for empty stack
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@infradead.org> Tested-by: Joerg Roedel <jroedel@suse.de> Link: https://lore.kernel.org/r/20210617190313.256987481@infradead.org
Diffstat (limited to 'kernel/locking/lockdep.c')
-rw-r--r--kernel/locking/lockdep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c
index 6ff1e8405a83..0584b2090084 100644
--- a/kernel/locking/lockdep.c
+++ b/kernel/locking/lockdep.c
@@ -4688,7 +4688,7 @@ static int check_wait_context(struct task_struct *curr, struct held_lock *next)
u8 curr_inner;
int depth;
- if (!curr->lockdep_depth || !next_inner || next->trylock)
+ if (!next_inner || next->trylock)
return 0;
if (!next_outer)