[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
Showing
Please register or sign in to comment