Patch "iwlwifi: fix kernel crash when unregistering thermal zone" has been added to the 4.9-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
iwlwifi: fix kernel crash when unregistering thermal zone
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
iwlwifi-fix-kernel-crash-when-unregistering-thermal-zone.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Mon Jul 3 13:09:02 CEST 2017
From: Jens Axboe <[email protected]>
Date: Tue, 17 Jan 2017 14:22:24 -0800
Subject: iwlwifi: fix kernel crash when unregistering thermal zone
From: Jens Axboe <[email protected]>
[ Upstream commit 92549cdc288f47f3a98cf80ac5890c91f5876a06 ]
A recent firmware change seems to have enabled thermal zones on the iwlwifi driver. Unfortunately, my device fails when registering the thermal zone. This doesn't stop the driver from attempting to unregister the thermal zone at unload time, triggering a NULL pointer deference in strlen() off the thermal_zone_device_unregister() path.
Don't unregister if name is NULL, for that case we failed registering. Do the same for the cooling zone.
--- drivers/net/wireless/intel/iwlwifi/mvm/tt.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
drivers/net/wireless/intel/iwlwifi/mvm/tt.c +8 -4
@@ -843,8 +843,10 @@ static void iwl_mvm_thermal_zone_unregisreturn ;IWL_DEBUG_TEMP (mvm,"Thermal zone device unregister\n" ); -thermal_zone_device_unregister (mvm->tz_device.tzone); - mvm->tz_device.tzone =NULL ; +if (mvm->tz_device.tzone) { +thermal_zone_device_unregister (mvm->tz_device.tzone); + mvm->tz_device.tzone =NULL ; + } }static void iwl_mvm_cooling_device_unregister (struct iwl_mvm *mvm)
@@ -853,8 +855,10 @@ static void iwl_mvm_cooling_device_unregreturn ;IWL_DEBUG_TEMP (mvm,"Cooling device unregister\n" ); -thermal_cooling_device_unregister (mvm->cooling_dev.cdev); - mvm->cooling_dev.cdev = NULL; +if (mvm->cooling_dev.cdev) { +thermal_cooling_device_unregister (mvm->cooling_dev.cdev); + mvm->cooling_dev.cdev =NULL ; + } }#endif /* CONFIG_THERMAL */
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/iwlwifi-fix-kernel-crash-when-unregistering-thermal-zone.patch