diff options
author | Zhang Rui <rui.zhang@intel.com> | 2009-06-23 04:20:29 +0200 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-06-24 05:23:14 +0200 |
commit | c02256be79a1a3557332ac51e653d574a2a7d2b5 (patch) | |
tree | cad4af410464c14f0641148929b32bf3ab82ebd6 /drivers/acpi/scan.c | |
parent | Linux 2.6.30 (diff) | |
download | linux-c02256be79a1a3557332ac51e653d574a2a7d2b5.tar.xz linux-c02256be79a1a3557332ac51e653d574a2a7d2b5.zip |
ACPI: fix a deadlock in hotplug case
we used to run the hotplug code in keventd_wq.
But when hot removing the ACPI battery device,
power_supply_unregister invokes flush_scheduled_work.
This causes a deadlock. i.e
1. When dock is unplugged, all the hotplug code is run on kevent_wq.
2. the hotplug code removes all the child devices of dock device.
3. removing the child device may invoke flush_scheduled_work
4. flush_scheduled_work waits until all the work on kevent_wq to be
finished, while this will never be true because the hotplug code
is running on keventd_wq...
Introduce a new workqueue for hotplug in this patch.
http://bugzilla.kernel.org/show_bug.cgi?id=13533
Tested-by: Paul Martin <pm@debian.org>
Tested-by: Vojtech Gondzala <vojtech.gondzala@gmail.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions