From: Greg Kroah-Hartman Date: Tue, 26 Nov 2019 09:46:00 +0000 (+0100) Subject: 4.9-stable patches X-Git-Tag: v4.4.204~73 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e7d383820480f4f8a67ac0e8a5498d04401911b7;p=thirdparty%2Fkernel%2Fstable-queue.git 4.9-stable patches added patches: ath9k_hw-fix-uninitialized-variable-data.patch --- 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 index 00000000000..3e994f4e788 --- /dev/null +++ b/queue-4.9/ath9k_hw-fix-uninitialized-variable-data.patch @@ -0,0 +1,39 @@ +From 80e84f36412e0c5172447b6947068dca0d04ee82 Mon Sep 17 00:00:00 2001 +From: Denis Efremov +Date: Fri, 27 Sep 2019 01:56:04 +0300 +Subject: ath9k_hw: fix uninitialized variable data + +From: Denis Efremov + +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 +Cc: John W. Linville +Cc: Kalle Valo +Cc: "David S. Miller" +Cc: stable@vger.kernel.org +Signed-off-by: Denis Efremov +Signed-off-by: Kalle Valo +Signed-off-by: Greg Kroah-Hartman + +--- + 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; diff --git a/queue-4.9/series b/queue-4.9/series index 94a57629377..0e18d12e0e8 100644 --- a/queue-4.9/series +++ b/queue-4.9/series @@ -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