]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Nov 2019 09:46:00 +0000 (10:46 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Nov 2019 09:46:00 +0000 (10:46 +0100)
added patches:
ath9k_hw-fix-uninitialized-variable-data.patch

queue-4.9/ath9k_hw-fix-uninitialized-variable-data.patch [new file with mode: 0644]
queue-4.9/series

diff --git a/queue-4.9/ath9k_hw-fix-uninitialized-variable-data.patch b/queue-4.9/ath9k_hw-fix-uninitialized-variable-data.patch
new file mode 100644 (file)
index 0000000..3e994f4
--- /dev/null
@@ -0,0 +1,39 @@
+From 80e84f36412e0c5172447b6947068dca0d04ee82 Mon Sep 17 00:00:00 2001
+From: Denis Efremov <efremov@linux.com>
+Date: Fri, 27 Sep 2019 01:56:04 +0300
+Subject: ath9k_hw: fix uninitialized variable data
+
+From: Denis Efremov <efremov@linux.com>
+
+commit 80e84f36412e0c5172447b6947068dca0d04ee82 upstream.
+
+Currently, data variable in ar9003_hw_thermo_cal_apply() could be
+uninitialized if ar9300_otp_read_word() will fail to read the value.
+Initialize data variable with 0 to prevent an undefined behavior. This
+will be enough to handle error case when ar9300_otp_read_word() fails.
+
+Fixes: 80fe43f2bbd5 ("ath9k_hw: Read and configure thermocal for AR9462")
+Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
+Cc: John W. Linville <linville@tuxdriver.com>
+Cc: Kalle Valo <kvalo@codeaurora.org>
+Cc: "David S. Miller" <davem@davemloft.net>
+Cc: stable@vger.kernel.org
+Signed-off-by: Denis Efremov <efremov@linux.com>
+Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/ath/ath9k/ar9003_eeprom.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
++++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
+@@ -4115,7 +4115,7 @@ static void ar9003_hw_thermometer_apply(
+ static void ar9003_hw_thermo_cal_apply(struct ath_hw *ah)
+ {
+-      u32 data, ko, kg;
++      u32 data = 0, ko, kg;
+       if (!AR_SREV_9462_20_OR_LATER(ah))
+               return;
index 94a57629377c9b141c39bfe4bb2783ffd6934d6f..0e18d12e0e86f28fc099b4550d4fefb6b53a2d3a 100644 (file)
@@ -109,3 +109,4 @@ spi-omap2-mcspi-fix-dma-and-fifo-event-trigger-size-.patch
 mm-memory_hotplug-do-not-unlock-when-fails-to-take-t.patch
 bluetooth-fix-invalid-free-in-bcsp_close.patch
 kvm-mmu-do-not-treat-zone_device-pages-as-being-reserved.patch
+ath9k_hw-fix-uninitialized-variable-data.patch