Skip to content

Commit

Permalink
lockdep: Fix wait-type for empty stack
Browse files Browse the repository at this point in the history
[ Upstream commit f8b298c ]

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

Fixes: de8f5e4 ("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
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Peter Zijlstra authored and gregkh committed Jul 14, 2021
1 parent ca47a4f commit fca9e78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/locking/lockdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -4626,7 +4626,7 @@ static int check_wait_context(struct task_struct *curr, struct held_lock *next)
short curr_inner;
int depth;

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

if (!next_outer)
Expand Down

0 comments on commit fca9e78

Please sign in to comment.