Skip to content

Commit

Permalink
wifi: ath12k: relax list iteration in ath12k_mac_vif_unref()
Browse files Browse the repository at this point in the history
In ath12k_mac_vif_unref() dp->tx_desc_used_list[i]
is not altered so list_for_each_entry() should be safe.

Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20230704173718.73462-1-dmantipov@yandex.ru
  • Loading branch information
Dmitry Antipov authored and Kalle Valo committed Aug 3, 2023
1 parent 07c01b8 commit 89a9dda
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/wireless/ath/ath12k/mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -5542,16 +5542,16 @@ static int ath12k_mac_op_add_interface(struct ieee80211_hw *hw,

static void ath12k_mac_vif_unref(struct ath12k_dp *dp, struct ieee80211_vif *vif)
{
struct ath12k_tx_desc_info *tx_desc_info, *tmp1;
struct ath12k_tx_desc_info *tx_desc_info;
struct ath12k_skb_cb *skb_cb;
struct sk_buff *skb;
int i;

for (i = 0; i < ATH12K_HW_MAX_QUEUES; i++) {
spin_lock_bh(&dp->tx_desc_lock[i]);

list_for_each_entry_safe(tx_desc_info, tmp1, &dp->tx_desc_used_list[i],
list) {
list_for_each_entry(tx_desc_info, &dp->tx_desc_used_list[i],
list) {
skb = tx_desc_info->skb;
if (!skb)
continue;
Expand Down

0 comments on commit 89a9dda

Please sign in to comment.