From: Greg Kroah-Hartman Date: Sat, 4 May 2019 09:22:29 +0000 (+0200) Subject: 5.0-stable patches X-Git-Tag: v4.19.40~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7c23c59357e9fb11ca1461221f460fc51bca078b;p=thirdparty%2Fkernel%2Fstable-queue.git 5.0-stable patches added patches: ath10k-drop-warn_on-s-that-always-trigger-during-system-resume.patch iwlwifi-mvm-properly-check-debugfs-dentry-before-using-it.patch --- diff --git a/queue-5.0/ath10k-drop-warn_on-s-that-always-trigger-during-system-resume.patch b/queue-5.0/ath10k-drop-warn_on-s-that-always-trigger-during-system-resume.patch new file mode 100644 index 00000000000..cb6af746211 --- /dev/null +++ b/queue-5.0/ath10k-drop-warn_on-s-that-always-trigger-during-system-resume.patch @@ -0,0 +1,51 @@ +From 9e80ad37f6788ed52b89a3cfcd593e0aa69b216d Mon Sep 17 00:00:00 2001 +From: "Rafael J. Wysocki" +Date: Sun, 3 Mar 2019 18:24:33 +0100 +Subject: ath10k: Drop WARN_ON()s that always trigger during system resume + +From: Rafael J. Wysocki + +commit 9e80ad37f6788ed52b89a3cfcd593e0aa69b216d upstream. + +ath10k_mac_vif_chan() always returns an error for the given vif +during system-wide resume which reliably triggers two WARN_ON()s +in ath10k_bss_info_changed() and they are not particularly +useful in that code path, so drop them. + +Tested: QCA6174 hw3.2 PCI with WLAN.RM.2.0-00180-QCARMSWPZ-1 +Tested: QCA6174 hw3.2 SDIO with WLAN.RMH.4.4.1-00007-QCARMSWP-1 + +Fixes: cd93b83ad927 ("ath10k: support for multicast rate control") +Fixes: f279294e9ee2 ("ath10k: add support for configuring management packet rate") +Cc: stable@vger.kernel.org +Reviewed-by: Brian Norris +Tested-by: Brian Norris +Tested-by: Claire Chang +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Kalle Valo +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/ath/ath10k/mac.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/net/wireless/ath/ath10k/mac.c ++++ b/drivers/net/wireless/ath/ath10k/mac.c +@@ -5705,7 +5705,7 @@ static void ath10k_bss_info_changed(stru + } + + if (changed & BSS_CHANGED_MCAST_RATE && +- !WARN_ON(ath10k_mac_vif_chan(arvif->vif, &def))) { ++ !ath10k_mac_vif_chan(arvif->vif, &def)) { + band = def.chan->band; + rateidx = vif->bss_conf.mcast_rate[band] - 1; + +@@ -5743,7 +5743,7 @@ static void ath10k_bss_info_changed(stru + } + + if (changed & BSS_CHANGED_BASIC_RATES) { +- if (WARN_ON(ath10k_mac_vif_chan(vif, &def))) { ++ if (ath10k_mac_vif_chan(vif, &def)) { + mutex_unlock(&ar->conf_mutex); + return; + } diff --git a/queue-5.0/iwlwifi-mvm-properly-check-debugfs-dentry-before-using-it.patch b/queue-5.0/iwlwifi-mvm-properly-check-debugfs-dentry-before-using-it.patch new file mode 100644 index 00000000000..46efa62eb7d --- /dev/null +++ b/queue-5.0/iwlwifi-mvm-properly-check-debugfs-dentry-before-using-it.patch @@ -0,0 +1,48 @@ +From 154d4899e4111ae24e68d6ba955f46856cb046bc Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Sat, 30 Mar 2019 10:31:52 +0100 +Subject: iwlwifi: mvm: properly check debugfs dentry before using it + +From: Greg Kroah-Hartman + +commit 154d4899e4111ae24e68d6ba955f46856cb046bc upstream. + +debugfs can now report an error code if something went wrong instead of +just NULL. So if the return value is to be used as a "real" dentry, it +needs to be checked if it is an error before dereferencing it. + +This is now happening because of ff9fb72bc077 ("debugfs: return error +values, not NULL"). If multiple iwlwifi devices are in the system, this +can cause problems when the driver attempts to create the main debugfs +directory again. Later on in the code we fail horribly by trying to +dereference a pointer that is an error value. + +Reported-by: Laura Abbott +Reported-by: Gabriel Ramirez +Cc: Johannes Berg +Cc: Emmanuel Grumbach +Cc: Luca Coelho +Cc: Intel Linux Wireless +Cc: Kalle Valo +Cc: stable # 5.0 +Signed-off-by: Luca Coelho +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c ++++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c +@@ -1482,6 +1482,11 @@ void iwl_mvm_vif_dbgfs_register(struct i + return; + + mvmvif->dbgfs_dir = debugfs_create_dir("iwlmvm", dbgfs_dir); ++ if (IS_ERR_OR_NULL(mvmvif->dbgfs_dir)) { ++ IWL_ERR(mvm, "Failed to create debugfs directory under %pd\n", ++ dbgfs_dir); ++ return; ++ } + + if (!mvmvif->dbgfs_dir) { + IWL_ERR(mvm, "Failed to create debugfs directory under %pd\n", diff --git a/queue-5.0/series b/queue-5.0/series index 3674b04244c..0145cb59a19 100644 --- a/queue-5.0/series +++ b/queue-5.0/series @@ -28,3 +28,5 @@ net-tls-fix-copy-to-fragments-in-reencrypt.patch kvm-x86-whitelist-port-0x7e-for-pre-incrementing-rip.patch kvm-nvmx-fix-size-checks-in-vmx_set_nested_state.patch alsa-line6-use-dynamic-buffers.patch +iwlwifi-mvm-properly-check-debugfs-dentry-before-using-it.patch +ath10k-drop-warn_on-s-that-always-trigger-during-system-resume.patch