ait_for_completion() |
| cpus_read_lock()
It constitutes ABBA deadlock indirectly between "cpu_hotplug_lock" and
"hwlat_data.lock", make the mutex obtaining in kthread_fn() interruptible
to fix this.
Fixes: ba998f7d9531 ("trace/hwlat: Support hotplug operations
perations")
Signed-off-by: Wei Li
---
kernel/trace/trace_osnoise.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/trace/trace_osnoise.c b/kernel/trace/trace_osnoise.c
index ddc9afb9b7d4..6ed4008e6d62 100644
--- a/kernel/trace/trace_osnoise.c
+++ b/kernel/trace/trace_osnoise.c
@@
) as it can take
cpu_read_lock() again.
Fixes: 5bfbcd1ee57b ("tracing/timerlat: Add interface_lock around clearing of
kthread in stop_kthread()")
Signed-off-by: Wei Li
---
kernel/trace/trace_osnoise.c | 13 ++---
1 file changed, 6 insertions(+), 7 deletions(-)
diff --g
The cpuhp online/offline processing race also exists in percpu-mode hwlat
tracer in theory, apply the fix too.
Fixes: ba998f7d9531 ("trace/hwlat: Support hotplug operations")
Signed-off-by: Wei Li
---
kernel/trace/trace_hwlat.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/ke
rt_kthread() to prevent this situation.
Fixes: c8895e271f79 ("trace/osnoise: Support hotplug operations")
Signed-off-by: Wei Li
---
kernel/trace/trace_osnoise.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/kernel/trace/trace_osnoise.c b/kernel/trace/t
e
while true
do
echo hwlat > /sys/kernel/debug/tracing/current_tracer
echo nop > /sys/kernel/debug/tracing/current_tracer
done
```
Wei Li (5):
tracing/timerlat: Fix duplicated kthread creation due to CPU
online/offline
tracing/timerlat: Drop interface_lock in stop_kthread()