All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luca Coelho <luca@coelho.fi>
To: kvalo@codeaurora.org
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH v5.6 1/7] iwlwifi: mvm: take the required lock when clearing time event data
Date: Fri,  6 Mar 2020 15:16:21 +0200	[thread overview]
Message-ID: <iwlwifi.20200306151128.a49846a634e4.Id1ada7c5a964f5e25f4d0eacc2c4b050015b46a2@changeid> (raw)
In-Reply-To: <20200306131627.503176-1-luca@coelho.fi>

From: Avraham Stern <avraham.stern@intel.com>

When receiving a session protection end notification, the time event
data is cleared without holding the required lock. Fix it.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/time-event.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c b/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c
index c0b420fe5e48..1babc4bb5194 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c
@@ -785,7 +785,9 @@ void iwl_mvm_rx_session_protect_notif(struct iwl_mvm *mvm,
 		if (!le32_to_cpu(notif->status)) {
 			iwl_mvm_te_check_disconnect(mvm, vif,
 						    "Session protection failure");
+			spin_lock_bh(&mvm->time_event_lock);
 			iwl_mvm_te_clear_data(mvm, te_data);
+			spin_unlock_bh(&mvm->time_event_lock);
 		}
 
 		if (le32_to_cpu(notif->start)) {
@@ -801,7 +803,9 @@ void iwl_mvm_rx_session_protect_notif(struct iwl_mvm *mvm,
 			 */
 			iwl_mvm_te_check_disconnect(mvm, vif,
 						    "No beacon heard and the session protection is over already...");
+			spin_lock_bh(&mvm->time_event_lock);
 			iwl_mvm_te_clear_data(mvm, te_data);
+			spin_unlock_bh(&mvm->time_event_lock);
 		}
 
 		goto out_unlock;
-- 
2.25.1


  reply	other threads:[~2020-03-06 13:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-06 13:16 [PATCH v5.6 0/7] iwlwifi: fixes intended for 5.6 2020-03-06 Luca Coelho
2020-03-06 13:16 ` Luca Coelho [this message]
2020-03-06 13:16 ` [PATCH v5.6 2/7] iwlwifi: consider HE capability when setting LDPC Luca Coelho
2020-03-06 13:16 ` [PATCH v5.6 3/7] iwlwifi: check allocated pointer when allocating conf_tlvs Luca Coelho
2020-03-06 13:16 ` [PATCH v5.6 4/7] iwlwifi: yoyo: don't add TLV offset when reading FIFOs Luca Coelho
2020-03-06 13:16 ` [PATCH v5.6 5/7] iwlwifi: dbg: don't abort if sending DBGC_SUSPEND_RESUME fails Luca Coelho
2020-03-06 13:16 ` [PATCH v5.6 6/7] iwlwifi: mvm: Fix rate scale NSS configuration Luca Coelho
2020-03-06 13:16 ` [PATCH v5.6 7/7] iwlwifi: cfg: use antenna diversity with all AX101 devices Luca Coelho

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=iwlwifi.20200306151128.a49846a634e4.Id1ada7c5a964f5e25f4d0eacc2c4b050015b46a2@changeid \
    --to=luca@coelho.fi \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.