Skip to content

Commit 2807bd1

Browse files
Aaron Lurafaeljw
authored andcommitted
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>
1 parent 4b660a7 commit 2807bd1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/acpi/thermal.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1278,8 +1278,8 @@ static int __init acpi_thermal_init(void)
12781278

12791279
static void __exit acpi_thermal_exit(void)
12801280
{
1281-
destroy_workqueue(acpi_thermal_pm_queue);
12821281
acpi_bus_unregister_driver(&acpi_thermal_driver);
1282+
destroy_workqueue(acpi_thermal_pm_queue);
12831283

12841284
return;
12851285
}

0 commit comments

Comments
 (0)