]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: mac80211: drop stray 'static' from fast-RX rx_result
authorCatherine <enderaoelyther@gmail.com>
Fri, 24 Apr 2026 13:14:36 +0000 (21:14 +0800)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 27 Apr 2026 10:41:55 +0000 (12:41 +0200)
ieee80211_invoke_fast_rx() is documented as safe for parallel RX, but
its per-invocation rx_result is declared static. Concurrent callers then
share one instance and can overwrite each other's result between
ieee80211_rx_mesh_data() and the switch on res.

That can make a packet that was queued or consumed by
ieee80211_rx_mesh_data() fall through into ieee80211_rx_8023(), or make
a packet that should continue return as queued.

Make res an automatic variable so each invocation keeps its own result.

Fixes: 3468e1e0c639 ("wifi: mac80211: add mesh fast-rx support")
Cc: stable@vger.kernel.org
Signed-off-by: Catherine <enderaoelyther@gmail.com>
Link: https://patch.msgid.link/20260424131435.83212-2-enderaoelyther@gmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/rx.c

index 5a92413a911f2d77b9c9d70d49082cf23fc3a2da..d18e962126ce4d8d6bbb62c487a39d15dddb0bb6 100644 (file)
@@ -4971,7 +4971,7 @@ static bool ieee80211_invoke_fast_rx(struct ieee80211_rx_data *rx,
        struct sk_buff *skb = rx->skb;
        struct ieee80211_hdr *hdr = (void *)skb->data;
        struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
-       static ieee80211_rx_result res;
+       ieee80211_rx_result res;
        int orig_len = skb->len;
        int hdrlen = ieee80211_hdrlen(hdr->frame_control);
        int snap_offs = hdrlen;