From: Zhang Rui Date: Tue, 23 Jun 2009 02:20:29 +0000 (+0800) Subject: ACPI: fix a deadlock in hotplug case X-Git-Tag: v2.6.31-rc1~12^2~9^8~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c02256be79a1a3557332ac51e653d574a2a7d2b5;p=pandora-kernel.git 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 Tested-by: Vojtech Gondzala Signed-off-by: Zhang Rui Reviewed-by: Bjorn Helgaas Signed-off-by: Len Brown --- Reading git-diff-tree failed