Thread (15 messages) flat view 15 messages, 4 authors, 9d ago

Re: [PATCH 1/4] tracing/osnoise: Per-cpu mutex and fd detachment

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2026-08-26 19:31:00
Also in: sashiko-reviews

On Mon, 24 Aug 2026 21:30:37 +0000
sashiko-bot@kernel.org wrote:
[Severity: High]
Can holding osn_var->lock while calling kthread_stop() cause a deadlock?

kthread_stop() blocks waiting for the target kthread to exit. However, if
the kthread is currently handling a migration request in
osnoise_migration_pending() (shown slightly earlier in the diff), it will
attempt to acquire this same osn_var->lock before it can clear its state and
exit:
This code has a lot of nastiness in the locking with regard to the thread.
I haven't looked deeply at your patch, but the fact that Sashiko pointed
out a possible deadlock I think you may be hitting the mess I was hitting.

Have you looked at this thread: https://lore.kernel.org/all/20240820130001.124768-1-tglozar@redhat.com/ (local)

It has some tests I ran along with tracing that detected issues. Of course,
everything needs to be run with lockdep enabled too.

-- Steve
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help