• Alan Jenkins's avatar
    eeepc-laptop: fix hot-unplug on resume · 7334546a
    Alan Jenkins authored
    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=13825Signed-off-by: default avatarAlan Jenkins <alan-jenkins@tuffmail.co.uk>
    Acked-by: default avatarCorentin Chary <corentin.chary@gmail.com>
    Signed-off-by: default avatarLen Brown <len.brown@intel.com>
    7334546a
eeepc-laptop.c 28.4 KB