On 2018-10-01 23:58, Rajkumar Manoharan wrote: >> Great! I'll fold in the rest, test it with ath9k and submit as a >> proper patch :) >> > Toke, > > I noticed a race condition b/w sta cleanup and kick_airtime tasklet. > How do you > plan to exit kick_airtime gracefully during sta_cleanup? > If kick_airtime tasklet is only used for adjusting deficit for all throttled txq, then below rcu lock issue is not observed. I am testing with 50 clients and the crash happens only during sta cleanup. Releasing active_txq_lock from tasklet is yielding handle to txq_purge(). I am thinking of get rid of tasklet and handle adjustment directly in API. diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 0bb590928dd0..277dbf8e0a4b 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -261,14 +261,7 @@ static void __ieee80211_kick_airtime(struct ieee80211_local *local, int ac) if (sta->airtime[ac].deficit >= 0) { seen_eligible = true; - - if (!test_and_clear_bit(IEEE80211_TXQ_AIRTIME_THROTTLE, - &txqi->flags)) - continue; - - spin_unlock_bh(&local->active_txq_lock[ac]); - drv_wake_tx_queue(local, txqi); - spin_lock_bh(&local->active_txq_lock[ac]); + clear_bit(IEEE80211_TXQ_AIRTIME_THROTTLE, &txqi->flags); -Rajkumar