From: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
To: Catherine <enderaoelyther@gmail.com>,
linux-wireless@vger.kernel.org, Felix Fietkau <nbd@nbd.name>
Cc: johannes@sipsolutions.net, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] wifi: mac80211: drop stray 'static' from fast-RX rx_result
Date: Tue, 28 Apr 2026 07:23:30 -0700 [thread overview]
Message-ID: <17d5b91c-026f-4539-a39a-cfd976860273@oss.qualcomm.com> (raw)
In-Reply-To: <20260424131435.83212-2-enderaoelyther@gmail.com>
On 4/24/2026 6:14 AM, Catherine wrote:
> 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")
@Felix: Any recollection why this was static in your original patch?
> Cc: stable@vger.kernel.org
> Signed-off-by: Catherine <enderaoelyther@gmail.com>
Is this an identity you commonly use? Note that anonymous contributions are
not allowed:
https://www.kernel.org/doc/html/latest/process/submitting-patches.html#developer-s-certificate-of-origin-1-1
> ---
> net/mac80211/rx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
> index 3e5d1c47a..8719db8f3 100644
> --- a/net/mac80211/rx.c
> +++ b/net/mac80211/rx.c
> @@ -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;
Actual patch seem reasonable..
Reviewed-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
next prev parent reply other threads:[~2026-04-28 14:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-24 13:14 [PATCH] wifi: mac80211: drop stray 'static' from fast-RX rx_result Catherine
2026-04-28 14:23 ` Jeff Johnson [this message]
2026-04-29 5:49 ` Zhao Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=17d5b91c-026f-4539-a39a-cfd976860273@oss.qualcomm.com \
--to=jeff.johnson@oss.qualcomm.com \
--cc=enderaoelyther@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=nbd@nbd.name \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox