projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e61dd67
)
lockdep: Fix lockdep_set_notrack_class() for CONFIG_LOCK_STAT
author
Kent Overstreet
<kent.overstreet@linux.dev>
Wed, 31 Jul 2024 01:14:08 +0000
(21:14 -0400)
committer
Kent Overstreet
<kent.overstreet@linux.dev>
Wed, 7 Aug 2024 12:31:10 +0000
(08:31 -0400)
We won't find a contended lock if it's not being tracked.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
kernel/locking/lockdep.c
patch
|
blob
|
history
diff --git
a/kernel/locking/lockdep.c
b/kernel/locking/lockdep.c
index
58c8822
..
0349f95
100644
(file)
--- a/
kernel/locking/lockdep.c
+++ b/
kernel/locking/lockdep.c
@@
-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_);