]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 May 2021 17:39:15 +0000 (19:39 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 May 2021 17:39:15 +0000 (19:39 +0200)
added patches:
iwlwifi-fix-softirq-hardirq-disabling-in-iwl_pcie_gen2_enqueue_hcmd.patch

queue-4.14/iwlwifi-fix-softirq-hardirq-disabling-in-iwl_pcie_gen2_enqueue_hcmd.patch [new file with mode: 0644]
queue-4.14/series

diff --git a/queue-4.14/iwlwifi-fix-softirq-hardirq-disabling-in-iwl_pcie_gen2_enqueue_hcmd.patch b/queue-4.14/iwlwifi-fix-softirq-hardirq-disabling-in-iwl_pcie_gen2_enqueue_hcmd.patch
new file mode 100644 (file)
index 0000000..be8f120
--- /dev/null
@@ -0,0 +1,57 @@
+From e7020bb068d8be50a92f48e36b236a1a1ef9282e Mon Sep 17 00:00:00 2001
+From: Jiri Kosina <jkosina@suse.cz>
+Date: Sat, 17 Apr 2021 11:13:39 +0200
+Subject: iwlwifi: Fix softirq/hardirq disabling in iwl_pcie_gen2_enqueue_hcmd()
+
+From: Jiri Kosina <jkosina@suse.cz>
+
+commit e7020bb068d8be50a92f48e36b236a1a1ef9282e upstream.
+
+Analogically to what we did in 2800aadc18a6 ("iwlwifi: Fix softirq/hardirq
+disabling in iwl_pcie_enqueue_hcmd()"), we must apply the same fix to
+iwl_pcie_gen2_enqueue_hcmd(), as it's being called from exactly the same
+contexts.
+
+Reported-by: Heiner Kallweit <hkallweit1@gmail.com
+Signed-off-by: Jiri Kosina <jkosina@suse.cz>
+Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
+Link: https://lore.kernel.org/r/nycvar.YFH.7.76.2104171112390.18270@cbobk.fhfr.pm
+Signed-off-by: Jari Ruusu <jariruusu@protonmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c |    7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+--- a/drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c
++++ b/drivers/net/wireless/intel/iwlwifi/pcie/tx-gen2.c
+@@ -559,6 +559,7 @@ static int iwl_pcie_gen2_enqueue_hcmd(st
+       const u8 *cmddata[IWL_MAX_CMD_TBS_PER_TFD];
+       u16 cmdlen[IWL_MAX_CMD_TBS_PER_TFD];
+       struct iwl_tfh_tfd *tfd = iwl_pcie_get_tfd(trans, txq, txq->write_ptr);
++      unsigned long flags2;
+       memset(tfd, 0, sizeof(*tfd));
+@@ -629,10 +630,10 @@ static int iwl_pcie_gen2_enqueue_hcmd(st
+               goto free_dup_buf;
+       }
+-      spin_lock_bh(&txq->lock);
++      spin_lock_irqsave(&txq->lock, flags2);
+       if (iwl_queue_space(txq) < ((cmd->flags & CMD_ASYNC) ? 2 : 1)) {
+-              spin_unlock_bh(&txq->lock);
++              spin_unlock_irqrestore(&txq->lock, flags2);
+               IWL_ERR(trans, "No space in command queue\n");
+               iwl_op_mode_cmd_queue_full(trans->op_mode);
+@@ -773,7 +774,7 @@ static int iwl_pcie_gen2_enqueue_hcmd(st
+       spin_unlock_irqrestore(&trans_pcie->reg_lock, flags);
+ out:
+-      spin_unlock_bh(&txq->lock);
++      spin_unlock_irqrestore(&txq->lock, flags2);
+ free_dup_buf:
+       if (idx < 0)
+               kfree(dup_buf);
index c9177d6fbf640646a5c5a8fbf6329b6eda554b1d..768fb9ac2e62482eef56b1ecb71cf2a7b9f57fe7 100644 (file)
@@ -9,3 +9,4 @@ mips-introduce-isa-rev.h-to-define-mips_isa_rev.patch
 mips-cpu-features.h-replace-__mips_isa_rev-with-mips_isa_rev.patch
 mips-do-not-include-hi-and-lo-in-clobber-list-for-r6.patch
 bpf-fix-masking-negation-logic-upon-negative-dst-register.patch
+iwlwifi-fix-softirq-hardirq-disabling-in-iwl_pcie_gen2_enqueue_hcmd.patch