]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
eeepc-laptop: fix hot-unplug on resume
authorAlan Jenkins <alan-jenkins@tuffmail.co.uk>
Mon, 29 Jun 2009 08:40:07 +0000 (09:40 +0100)
committerLen Brown <len.brown@intel.com>
Sun, 2 Aug 2009 16:35:53 +0000 (12:35 -0400)
commit7334546a52c6764df120459509b1f803a073eacc
tree8efbced7cb3d780e36681c2e110a8857f5da1ebc
parented680c4ad478d0fee9740f7d029087f181346564
eeepc-laptop: fix hot-unplug on resume

OOPS on resume when the wireless adaptor is disabled during suspend was
introduced by "eeepc-laptop: read rfkill soft-blocked state on resume".

Unable to handle kernel NULL pointer dereference

Process s2disk
Tainted: G W
IP: klist_put

Call trace:
? klist_del
? device_del
? device_unregister
? pci_stop_dev
? pci_stop_bus
? pci_remove_device
? eeepc_rfkill_hotplug [eeepc_laptop]
? eeepc_hotk_resume [eeepc_laptop]
? acpi_device_resume
? device_resume
? hibernation_snapshot

It appears the PCI device is removed twice.  The eeepc_rfkill_hotplug()
call from the resume handler is racing against the call from the ACPI
notifier callback.  The ACPI notification is triggered by the resume
handler when it refreshes the value of CM_ASL_WLAN.

The fix is to serialize hotplug calls using a workqueue.

http://bugzilla.kernel.org/show_bug.cgi?id=13825

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Acked-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/platform/x86/eeepc-laptop.c