]> Git Repo - linux.git/commitdiff
ACPI / thermal: fix workqueue destroy order
authorAaron Lu <[email protected]>
Mon, 26 May 2014 12:34:07 +0000 (14:34 +0200)
committerRafael J. Wysocki <[email protected]>
Mon, 26 May 2014 12:34:07 +0000 (14:34 +0200)
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 <[email protected]>
References: http://www.spinics.net/lists/kernel/msg1747251.html
Cc: All applicable <[email protected]>
Signed-off-by: Aaron Lu <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
drivers/acpi/thermal.c

index c1e31a41f94957d87ded390dfbfcc54333728e3c..25bbc55dca896889886a1e9ed856cfb6fa71135d 100644 (file)
@@ -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;
 }
This page took 0.055695 seconds and 4 git commands to generate.