• Ronald Tschalär's avatar
    ACPI / SBS: Fix rare oops when removing modules · 757c968c
    Ronald Tschalär authored
    There was a small race when removing the sbshc module where
    smbus_alarm() had queued acpi_smbus_callback() for deferred execution
    but it hadn't been run yet, so that when it did run hc had been freed
    and the module unloaded, resulting in an invalid paging request.
    
    A similar race existed when removing the sbs module with regards to
    acpi_sbs_callback() (which is called from acpi_smbus_callback()).
    
    We therefore need to ensure no callbacks are pending or executing before
    the cleanups are done and the modules are removed.
    Signed-off-by: default avatarRonald Tschalär <ronald@innovation.ch>
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    757c968c
sbshc.c 7.25 KB