From: Luca Coelho <luca@coelho.fi>
To: kvalo@codeaurora.org
Cc: linux-wireless@vger.kernel.org,
Johannes Berg <johannes.berg@intel.com>,
Luca Coelho <luciano.coelho@intel.com>
Subject: [PATCH 01/15] iwlwifi: mvm: synchronize TID queue removal
Date: Fri, 2 Nov 2018 13:07:46 +0200 [thread overview]
Message-ID: <20181102110800.29817-2-luca@coelho.fi> (raw)
In-Reply-To: <20181102110800.29817-1-luca@coelho.fi>
From: Johannes Berg <johannes.berg@intel.com>
When we mark a TID as no longer having a queue, there's no
guarantee the TX path isn't using this txq_id right now,
having accessed it just before we reset the value. To fix
this, add synchronize_net() when we change the TIDs from
having a queue to not having one, so that we can then be
sure that the TX path is no longer accessing that queue.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
index 1887d2b9f185..c2b7bb5d107c 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
@@ -545,6 +545,16 @@ static int iwl_mvm_remove_sta_queue_marking(struct iwl_mvm *mvm, int queue)
rcu_read_unlock();
+ /*
+ * The TX path may have been using this TXQ_ID from the tid_data,
+ * so make sure it's no longer running so that we can safely reuse
+ * this TXQ later. We've set all the TIDs to IWL_MVM_INVALID_QUEUE
+ * above, but nothing guarantees we've stopped using them. Thus,
+ * without this, we could get to iwl_mvm_disable_txq() and remove
+ * the queue while still sending frames to it.
+ */
+ synchronize_net();
+
return disable_agg_tids;
}
--
2.19.1
next prev parent reply other threads:[~2018-11-02 11:08 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-02 11:07 [PATCH 00/15] iwlwifi: updates intended for v4.21 2018-11-02 Luca Coelho
2018-11-02 11:07 ` Luca Coelho [this message]
2018-11-02 11:07 ` [PATCH 02/15] iwlwifi: mvm: remove queue_info_lock Luca Coelho
2018-11-02 11:07 ` [PATCH 03/15] iwlwifi: trans: Clear persistence bit when starting the FW Luca Coelho
2018-11-02 11:07 ` [PATCH 04/15] iwlwifi: mvm: enable low latency for soft ap Luca Coelho
2018-11-02 11:07 ` [PATCH 05/15] iwlwifi: mvm: switch management tx antenna only on tx failure Luca Coelho
2018-11-02 11:07 ` [PATCH 06/15] iwlwifi: fw: do not set sgi bits for HE connection Luca Coelho
2018-11-02 11:07 ` [PATCH 07/15] iwlwifi: mvm: toggle tx antenna if tx fails during connection establishment Luca Coelho
2018-11-02 11:07 ` [PATCH 08/15] iwlwifi: pcie: don't reset TXQ write pointer Luca Coelho
2018-11-02 11:07 ` [PATCH 09/15] iwlwifi: dbg: avoid passing trigger around Luca Coelho
2018-11-02 11:07 ` [PATCH 10/15] iwlwifi: mvm: add description to a few generic assert numbers Luca Coelho
2018-11-02 11:07 ` [PATCH 11/15] iwlwifi: mvm: Send non offchannel traffic via AP sta Luca Coelho
2018-11-02 11:07 ` [PATCH 12/15] iwlwifi: dbg: use helper to check if debug type is set Luca Coelho
2018-11-02 11:07 ` [PATCH 13/15] iwlwifi: mvm: remove unused conversion table Luca Coelho
2018-11-02 11:07 ` [PATCH 14/15] iwlwifi: add new cards for 9560, 9462, 9461 and killer series Luca Coelho
2018-11-02 11:08 ` [PATCH 15/15] iwlwifi: fw: use helper to determine whether to dump paging 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=20181102110800.29817-2-luca@coelho.fi \
--to=luca@coelho.fi \
--cc=johannes.berg@intel.com \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=luciano.coelho@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).