All of lore.kernel.org
 help / color / mirror / Atom feed
From: rcfa <kernel@cubiculum.net>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org, Ping-Ke Shih <pkshih@realtek.com>,
	rcfa <kernel@cubiculum.net>
Subject: Re: [PATCH wireless] wifi: mac80211: deauthenticate on stop if an association just completed
Date: Wed,  2 Dec 2026 06:20:13 +0000	[thread overview]
Message-ID: <20261202062013.2603976-1-kernel@cubiculum.net> (raw)
In-Reply-To: <20261101201251.1106968-1-kernel@cubiculum.net>

Hi Johannes,

One more ping on this one, because the race is real and still open.

cfg80211_leave() leaves an association that is still in progress to
mac80211, and ieee80211_mgd_stop() abandons it only if it is still in
progress. If the association response is processed in between,
ieee80211_do_stop() tears down an interface that is associated: the
WARN on sta_info_flush()'s result, "destroying interface with valid
links" for an MLD, and links whose channel contexts are never
unassigned. Here it happened for real, not in a test: NetworkManager
took the interface down for a scan MAC change in the same second as
an MLO association completed. With the end state forced by a test
hook and without the patch, the next round ended in a NULL pointer
dereference in ieee80211_rx_mgmt_beacon(); with it, the interface
deauthenticates on stop and reconnects cleanly.

ieee80211_mgd_quiesce() already closes the same window for suspend
(be72afe0a438); the patch does the same on stop. As far as I can see,
nothing merged or posted since then touches this path.

Ping-Ke guessed the patch was dropped because it reads like LLM output.
It was found and written with Claude Code, and the changelog says so,
as coding-assistants.rst asks. But I reproduced the problem, tested the
fix on the hardware, and I stand behind it. If you'd rather fix the race
another way, I'm glad to test that here. Otherwise, please reconsider
this one. I can send a v2 with a shorter changelog if that helps.

Thanks,
rcfa

(Drafted with Claude Code at my request.)

      parent reply	other threads:[~2026-12-02  6:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-01 20:12 [PATCH wireless] wifi: mac80211: deauthenticate on stop if an association just completed rcfa
2026-11-08  0:45 ` rcfa
2026-11-09  3:03   ` Ping-Ke Shih
2026-12-02  6:20 ` rcfa [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=20261202062013.2603976-1-kernel@cubiculum.net \
    --to=kernel@cubiculum.net \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pkshih@realtek.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.