linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iwlwifi: mvm: fix double list_add at iwl_mvm_mac_wake_tx_queue (other cases)
@ 2022-09-09 12:12 Jose Ignacio Tornos Martinez
  2022-09-26 18:49 ` Jose Ignacio Tornos Martinez
  2022-10-10  8:16 ` [PATCH v2] " Jose Ignacio Tornos Martinez
  0 siblings, 2 replies; 5+ messages in thread
From: Jose Ignacio Tornos Martinez @ 2022-09-09 12:12 UTC (permalink / raw)
  To: gregory.greenman, linux-wireless
  Cc: Jose Ignacio Tornos Martinez, Petr Stourac

Extend the applied solution with commit 14a3aacf517a9
("iwlwifi: mvm: fix double list_add at iwl_mvm_mac_wake_tx_queue")
to other cases where the station queues are also disabled and the related
lists are not emptied. In the same way, if some new element is added later
to the list in iwl_mvm_mac_wake_tx_queue, it can match with the old one
and produce the same commented BUG.

Again, in order to avoid this problem, we must also remove the related
lists when station queues are disabled.

Fixes: cfbc6c4c5b91c ("iwlwifi: mvm: support mac80211 TXQs model")
Reported-by: Petr Stourac <pstourac@redhat.com>
Tested-by: Petr Stourac <pstourac@redhat.com>
Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
index 2661d4e819ce..e28505a1f2c4 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c
@@ -367,6 +367,7 @@ static int iwl_mvm_disable_txq(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
 			iwl_mvm_txq_from_tid(sta, tid);
 
 		mvmtxq->txq_id = IWL_MVM_INVALID_QUEUE;
+		list_del_init(&mvmtxq->list);
 	}
 
 	/* Regardless if this is a reserved TXQ for a STA - mark it as false */
@@ -461,6 +462,7 @@ static int iwl_mvm_remove_sta_queue_marking(struct iwl_mvm *mvm, int queue)
 		mvmsta->tid_data[tid].txq_id = IWL_MVM_INVALID_QUEUE;
 
 		mvmtxq->txq_id = IWL_MVM_INVALID_QUEUE;
+		list_del_init(&mvmtxq->list);
 	}
 
 	mvmsta->tfd_queue_msk &= ~BIT(queue); /* Don't use this queue anymore */
-- 
2.37.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-10-11  8:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-09 12:12 [PATCH] iwlwifi: mvm: fix double list_add at iwl_mvm_mac_wake_tx_queue (other cases) Jose Ignacio Tornos Martinez
2022-09-26 18:49 ` Jose Ignacio Tornos Martinez
2022-10-10  8:16 ` [PATCH v2] " Jose Ignacio Tornos Martinez
2022-10-10  9:19   ` Kalle Valo
2022-10-11  8:42   ` [v2] wifi: " Kalle Valo

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).