Thread (29 messages) 29 messages, 2 authors, 2023-01-29
STALE1236d
Revisions (2)
  1. v8 current
  2. v9 [diff vs current]

[PATCH v8 15/25] locking/lockdep, cpu/hotplus: Use a weaker annotation in AP thread

From: Byungchul Park <hidden>
Date: 2023-01-27 01:51:36
Also in: dri-devel, linux-block, linux-fsdevel, linux-ide, linux-mm, lkml
Subsystem: cpu hotplug, the rest · Maintainers: Thomas Gleixner, Peter Zijlstra, Linus Torvalds

cb92173d1f0 ("locking/lockdep, cpu/hotplug: Annotate AP thread") was
introduced to make lockdep_assert_cpus_held() work in AP thread.

However, the annotation is too strong for that purpose. We don't have to
use more than try lock annotation for that.

Furthermore, now that Dept was introduced, false positive alarms was
reported by that. Replaced it with try lock annotation.

Signed-off-by: Byungchul Park <redacted>
---
 kernel/cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 6c0a92c..6a9b9c3 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -356,7 +356,7 @@ int lockdep_is_cpus_held(void)
 
 static void lockdep_acquire_cpus_lock(void)
 {
-	rwsem_acquire(&cpu_hotplug_lock.dep_map, 0, 0, _THIS_IP_);
+	rwsem_acquire(&cpu_hotplug_lock.dep_map, 0, 1, _THIS_IP_);
 }
 
 static void lockdep_release_cpus_lock(void)
-- 
1.9.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help