diff options
author | Aaron Lu <aaron.lu@intel.com> | 2014-05-26 08:34:07 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-05-26 08:34:07 -0400 |
commit | 2807bd18cc60ec471917b5158e98e4d7b7e030fb (patch) | |
tree | 69a1aee01047638ac34d2c83f4e58d41c1c99d03 /drivers/acpi/thermal.c | |
parent | 4b660a7f5c8099d88d1a43d8ae138965112592c7 (diff) |
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>
Diffstat (limited to 'drivers/acpi/thermal.c')
-rw-r--r-- | drivers/acpi/thermal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index c1e31a41f949..25bbc55dca89 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c | |||
@@ -1278,8 +1278,8 @@ static int __init acpi_thermal_init(void) | |||
1278 | 1278 | ||
1279 | static void __exit acpi_thermal_exit(void) | 1279 | static void __exit acpi_thermal_exit(void) |
1280 | { | 1280 | { |
1281 | destroy_workqueue(acpi_thermal_pm_queue); | ||
1282 | acpi_bus_unregister_driver(&acpi_thermal_driver); | 1281 | acpi_bus_unregister_driver(&acpi_thermal_driver); |
1282 | destroy_workqueue(acpi_thermal_pm_queue); | ||
1283 | 1283 | ||
1284 | return; | 1284 | return; |
1285 | } | 1285 | } |