• Z
    ACPI: fix hotplug race · 19cd847a
    Zhang Rui 提交于
    The hotplug notification handler and drivers' notification handler all
    run in one workqueue.  Before hotplug removes an acpi device, the
    device driver's notification handler is already be recorded to run just
    after global notification handler.  After hotplug notification handler
    runs, acpica will notice a NULL notification handler and crash.
    
    So now we run run hotplug in another workqueue and wait
    for all acpi notication handlers finish.
    This was found in battery hotplug, but actually all
    hotplug can be affected.
    Signed-off-by: NZhang Rui <rui.zhang@intel.com>
    Signed-off-by: NShaohua Li <shaohua.li@intel.com>
    Signed-off-by: NLen Brown <len.brown@intel.com>
    19cd847a
dock.c 29.2 KB