Thread (6 messages) 6 messages, 2 authors, 2021-04-04

Re: [PATCH V8 1/3] ath11k: switch to using ieee80211_tx_status_ext()

From: Karthikeyan periyasamy <hidden>
Date: 2021-03-19 05:32:02
Also in: ath11k

-	ieee80211_tx_status(ar->hw, msdu);
+	spin_lock_bh(&ab->base_lock);
+	peer = ath11k_peer_find_by_id(ab, ts->peer_id);
+	if (peer) {
+		arsta = (struct ath11k_sta *)peer->sta->drv_priv;
+		status.sta = peer->sta;
+		status.skb = msdu;
+		status.info = info;
+		status.rate = &arsta->last_txrate;
Assigning arsta holded last_txrate pointer to status.rate create race 
condition problem b/w sta delete and ieee80211_tx_status_ext, no ?
Hw we ensure that arsta pointer is valid until ieee80211_tx_status_ext() 
processing?

Instead why don't we have local struct rate_info and assign like below 
code snippet

         struct rate_info rate;
...
         rate = arsta->last_txrate;
         status.rate = &rate;

Thanks,
Karthikeyan P
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help