mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 19:07:52 +00:00
ACPI / thermal: fix workqueue destroy order
When the thermal module is to be removed, we should destroy the wq acpi_thermal_pm_queue after the ACPI driver's remove callback is executed as we will need to flush the workqueue there, or a NULL pointer access will be hit. Reported-and-tested-by: Kui Zhang <kuizhang@gmail.com> References: http://www.spinics.net/lists/kernel/msg1747251.html Cc: All applicable <stable@vger.kernel.org> Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
4b660a7f5c
commit
2807bd18cc
1 changed files with 1 additions and 1 deletions
|
@ -1278,8 +1278,8 @@ static int __init acpi_thermal_init(void)
|
|||
|
||||
static void __exit acpi_thermal_exit(void)
|
||||
{
|
||||
destroy_workqueue(acpi_thermal_pm_queue);
|
||||
acpi_bus_unregister_driver(&acpi_thermal_driver);
|
||||
destroy_workqueue(acpi_thermal_pm_queue);
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue