Messages in this thread | | | From | Linus Torvalds <> | Date | Tue, 15 Jan 2013 16:36:34 -0800 | Subject | Re: USB device cannot be reconnected and khubd "blocked for more than 120 seconds" |
| |
On Tue, Jan 15, 2013 at 3:50 PM, Tejun Heo <tj@kernel.org> wrote: > > For now, I'm gonna implement simple "I'm not gonna wait for myself" > self-deadlock avoidance.
You can't really do that. Or rather, it won't *help*.
The thing is, the module loading in particular is not necessarily happening in the same context as what *started* the module loading. A module loader will request the module from user space, and then later user space - through possibly a totally unrelated process - will finish it. So there is no "myself". There's not even necessarily any relationship that the kernel even knows about, because the module loading request can have gone from usermode_helper over something like dbus to systemd.
See?
There's a reason I asked for a warning for this. Or the "let's flag the current thread if it ever started anything asynchronous". Because it's complicated.
Linus
| |