diff --git a/kernel/locking/lockdep.c b/kernel/locking/lockdep.c index 111607d91489..124b4b7b793f 100644 --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -5009,6 +5009,9 @@ static int __lock_acquire(struct lockdep_map *lock, unsigned int subclass, if (unlikely(!debug_locks)) return 0; + if (unlikely(!lock)) + return 0; + if (!prove_locking || lock->key == &__lockdep_no_validate__) check = 0;