]> git.neil.brown.name Git - history.git/commit
[PATCH] Use workqueue for call_usermodehelper
authorAndrew Morton <akpm@osdl.org>
Mon, 26 Apr 2004 15:55:31 +0000 (08:55 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 26 Apr 2004 15:55:31 +0000 (08:55 -0700)
commit35f4fc9f6bb92dc2d425c472971927ced12547d4
tree0023fdae0fcfb25401273b2612ce71ef500e9d51
parentbf9e688d76438678a6d5a902a2a57f7d866e2b51
[PATCH] Use workqueue for call_usermodehelper

From: Rusty Russell <rusty@rustcorp.com.au>

call_usermodehelper uses keventd to create a thread, guaranteeing a nice,
clean kernel thread.  Unfortunately, there is a case where
call_usermodehelper is called with &bus->subsys.rwsem held (via
bus_add_driver()), but keventd could be running bus_add_device(), which is
blocked on the same lock.  The result is deadlock, and it comes from using
keventd for both.

In this case, it can be fixed by using a completely independent thread for
call_usermodehelper, or an independent workqueue.  Workqueues have the
infrastructure we need, so we use one.

Move EXPORT_SYMBOL while we're there, too.

akpm fixes: Make it compile with !CONFIG_KMOD
kernel/kmod.c