]> git.itanic.dy.fi Git - linux-stable/commit
iwlwifi: fix kernel crash when unregistering thermal zone
authorJens Axboe <axboe@kernel.dk>
Tue, 17 Jan 2017 22:22:24 +0000 (14:22 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Jul 2017 12:40:22 +0000 (14:40 +0200)
commite9a87e0f5bbb3f3fd28048b923b9941687c6233f
tree87f243126bf84398fc591ae398ce2f6cf0b058b0
parent322baf72eed51cef55a61f5d4ac1b51bd7824c1a
iwlwifi: fix kernel crash when unregistering thermal zone

[ 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.

Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/intel/iwlwifi/mvm/tt.c