Commit ff9bf4b3 authored by Kent Overstreet's avatar Kent Overstreet

lockdep: Fix lockdep_set_notrack_class() for CONFIG_LOCK_STAT

We won't find a contended lock if it's not being tracked.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent e61dd678
......@@ -5936,6 +5936,9 @@ __lock_contended(struct lockdep_map *lock, unsigned long ip)
if (DEBUG_LOCKS_WARN_ON(!depth))
return;
if (unlikely(lock->key == &__lockdep_no_track__))
return;
hlock = find_held_lock(curr, lock, depth, &i);
if (!hlock) {
print_lock_contention_bug(curr, lock, ip);
......@@ -5978,6 +5981,9 @@ __lock_acquired(struct lockdep_map *lock, unsigned long ip)
if (DEBUG_LOCKS_WARN_ON(!depth))
return;
if (unlikely(lock->key == &__lockdep_no_track__))
return;
hlock = find_held_lock(curr, lock, depth, &i);
if (!hlock) {
print_lock_contention_bug(curr, lock, _RET_IP_);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment