Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-10-25 15:32:01 +0200
committerTakashi Iwai <tiwai@suse.de>2018-10-25 15:32:13 +0200
commitae71040fd5aa5e7ab790b4975c853886508ac870 (patch)
tree8ac8382c7e752c4809a176fad69fbb3e241656be
parentfa1f306cb86431d58482731d2b2c553980a08263 (diff)
iwlwifi: pcie gen2: check iwl_pcie_gen2_set_tb() return value
(bsc#1051510).
-rw-r--r--patches.drivers/iwlwifi-pcie-gen2-check-iwl_pcie_gen2_set_tb-return-.patch33
-rw-r--r--series.conf1
2 files changed, 34 insertions, 0 deletions
diff --git a/patches.drivers/iwlwifi-pcie-gen2-check-iwl_pcie_gen2_set_tb-return-.patch b/patches.drivers/iwlwifi-pcie-gen2-check-iwl_pcie_gen2_set_tb-return-.patch
new file mode 100644
index 0000000000..4f806099b9
--- /dev/null
+++ b/patches.drivers/iwlwifi-pcie-gen2-check-iwl_pcie_gen2_set_tb-return-.patch
@@ -0,0 +1,33 @@
+From 76dd61d2c57e881020cd2ea61994bf2dc8aefd84 Mon Sep 17 00:00:00 2001
+From: Johannes Berg <johannes.berg@intel.com>
+Date: Mon, 18 Jun 2018 09:53:36 +0200
+Subject: [PATCH] iwlwifi: pcie gen2: check iwl_pcie_gen2_set_tb() return value
+Git-commit: 76dd61d2c57e881020cd2ea61994bf2dc8aefd84
+Patch-mainline: v4.20-rc1
+References: bsc#1051510
+
+If we use the iwl_pcie_gen2_set_tb() return value for BIT(),
+we should validate that it's not going to be negative, so do
+the check and bail out if we hit an error. We shouldn't, as
+we check if it'll fit beforehand, but better be safe.
+
+Fixes: ab6c644539e9 ("iwlwifi: pcie: copy TX functions to new transport")
+Signed-off-by: Johannes Berg <johannes.berg@intel.com>
+Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c
++++ b/drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c
+@@ -460,6 +460,8 @@ struct iwl_tfh_tfd *iwl_pcie_gen2_build_
+ goto out_err;
+ tb_idx = iwl_pcie_gen2_set_tb(trans, tfd, tb_phys,
+ skb_frag_size(frag));
++ if (tb_idx < 0)
++ goto out_err;
+
+ out_meta->tbs |= BIT(tb_idx);
+ }
diff --git a/series.conf b/series.conf
index a0039665eb..6e4923b2f1 100644
--- a/series.conf
+++ b/series.conf
@@ -18053,6 +18053,7 @@
patches.drivers/iwlwifi-mvm-Allow-TKIP-for-AP-mode.patch
patches.drivers/iwlwifi-mvm-check-for-n_profiles-validity-in-EWRD-AC.patch
patches.drivers/iwlwifi-mvm-clear-HW_RESTART_REQUESTED-when-stopping.patch
+ patches.drivers/iwlwifi-pcie-gen2-check-iwl_pcie_gen2_set_tb-return-.patch
patches.drivers/mac80211-minstrel-fix-using-short-preamble-CCK-rates.patch
patches.fixes/xfrm-use-complete-IPv6-addresses-for-hash.patch
patches.arch/signal-properly-deliver-sigsegv-from-x86-uprobes