Re: [BISECTED REGRESSION] Wireless networking kernel crashes

From: Felix Fietkau
Date: Sun Nov 21 2021 - 14:38:21 EST


On 2021-11-18 14:25, Aaro Koskinen wrote:
Hello,

I have tried to upgrade my wireless AP (Raspberry Pi with rt2x00usb)
from v5.9 to the current mainline, but now it keeps crashing every hour
or so, basically making my wireless network unusable.

I have bisected this to:

commit 03c3911d2d67a43ad4ffd15b534a5905d6ce5c59
Author: Ryder Lee <ryder.lee@xxxxxxxxxxxx>
Date: Thu Jun 17 18:31:12 2021 +0200

mac80211: call ieee80211_tx_h_rate_ctrl() when dequeue

With the previous commit the system stays up for weeks...

I just tried today's mainline, and it crashed after 10 minutes:
Please test if this patch fixes the issue:

---
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1822,15 +1822,15 @@ static int invoke_tx_handlers_late(struct ieee80211_tx_data *tx)
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb);
ieee80211_tx_result res = TX_CONTINUE;
+ if (!ieee80211_hw_check(&tx->local->hw, HAS_RATE_CONTROL))
+ CALL_TXH(ieee80211_tx_h_rate_ctrl);
+
if (unlikely(info->flags & IEEE80211_TX_INTFL_RETRANSMISSION)) {
__skb_queue_tail(&tx->skbs, tx->skb);
tx->skb = NULL;
goto txh_done;
}
- if (!ieee80211_hw_check(&tx->local->hw, HAS_RATE_CONTROL))
- CALL_TXH(ieee80211_tx_h_rate_ctrl);
-
CALL_TXH(ieee80211_tx_h_michael_mic_add);
CALL_TXH(ieee80211_tx_h_sequence);
CALL_TXH(ieee80211_tx_h_fragment);