Commit 5e351ad1 authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Ingo Molnar

locking/lockdep: Fix possible NULL deref

We can't invalidate xhlocks when we've not yet allocated any.
Reported-by: default avatarDmitry Vyukov <>
Signed-off-by: default avatarPeter Zijlstra (Intel) <>
Cc: Linus Torvalds <>
Cc: Peter Zijlstra <>
Cc: Thomas Gleixner <>
Fixes: f52be570 ("locking/lockdep: Untangle xhlock history save/restore from task independence")
Signed-off-by: default avatarIngo Molnar <>
parent 328b4ed9
......@@ -4790,7 +4790,8 @@ void lockdep_invariant_state(bool force)
* Verify the former, enforce the latter.
WARN_ON_ONCE(!force && current->lockdep_depth);
if (current->xhlocks)
static int cross_lock(struct lockdep_map *lock)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment