From: Remi Pommarel <repk@triplefau.lt>
To: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Johannes Berg <johannes@sipsolutions.net>
Subject: Re: [PATCH 0/2] Fixes packet processes after vif is stopped
Date: Sun, 16 Mar 2025 20:47:40 +0100 [thread overview]
Message-ID: <Z9cq3A0bqQxmvo42@pilgrim> (raw)
In-Reply-To: <cover.1741950009.git.repk@triplefau.lt>
On Fri, Mar 14, 2025 at 12:04:23PM +0100, Remi Pommarel wrote:
> Those are a couple of fixes that prevent crashes due to processing
> packets (especially multicast ones) for TX after vif is stopped (either
> after a mesh interface left the group or interface is put down).
>
> The first one ensure the key info passed to drivers through ieee80211
> skb control block is up to date, even after key removal.
>
> The second one ensure no packets get processed after vif driver private
> data is cleared in ieee80211_do_stop().
>
> As I tried to explain in second patch footnote, I can still see a
> theoretical reason that packets get queued after ieee80211_do_stop()
> call. But I was not able to reproduce it, so I may be missing a
> something here; making that more as an open question.
And I forgot to include the footnote in Patch 2/2. I was worried that
because the rcu_read_lock() in __ieee80211_subif_start_xmit() is taken
only after the sdata running state it could create a small window during
which a packet could still be enqueued passed the synchronize_rcu() of
ieee80211_do_stop(). But after digging a bit more, it seems that
all __ieee80211_subif_start_xmit() callers (e.g. __dev_queue_xmit())
take the rcu_read_lock() already. So please ignore this last remark.
Regards,
--
Remi
prev parent reply other threads:[~2025-03-16 19:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-14 11:04 [PATCH 0/2] Fixes packet processes after vif is stopped Remi Pommarel
2025-03-14 11:04 ` [PATCH 1/2] wifi: mac80211: Update skb's NULL key in ieee80211_tx_h_select_key() Remi Pommarel
2025-03-24 12:17 ` Johannes Berg
2025-03-24 14:02 ` Remi Pommarel
2025-03-24 15:08 ` Remi Pommarel
2025-03-24 15:39 ` Johannes Berg
2025-03-25 11:57 ` Toke Høiland-Jørgensen
2025-03-14 11:04 ` [PATCH 2/2] wifi: mac80211: Purge vif txq in ieee80211_do_stop() Remi Pommarel
2025-03-24 12:17 ` Johannes Berg
2025-03-16 19:47 ` Remi Pommarel [this message]
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=Z9cq3A0bqQxmvo42@pilgrim \
--to=repk@triplefau.lt \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@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