From: Johannes Berg <johannes@sipsolutions.net>
To: Cen Zhang <zzzccc427@gmail.com>
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
baijiaju1990@gmail.com
Subject: Re: [PATCH] wifi: nl80211: serialize socket owner release with netdev teardown
Date: Mon, 06 Jul 2026 13:42:06 +0200 [thread overview]
Message-ID: <4fc7e89b3203e9bc8843c848268519d34585a038.camel@sipsolutions.net> (raw)
In-Reply-To: <20260619162500.3876325-1-zzzccc427@gmail.com> (sfid-20260619_182509_015809_D905BC2E)
On Sat, 2026-06-20 at 00:25 +0800, Cen Zhang wrote:
> NETDEV_GOING_DOWN tears the interface down and cancels disconnect_wk, and
> NETDEV_UNREGISTER removes the wireless device from the cfg80211 list. There
> is no ordering between those paths today,
What's that supposed to mean? Of course there's ordering between those
two things?
> so the netlink notifier can pass
> the conn_owner_nlportid check before teardown clears it, then queue
> disconnect_wk after the NETDEV_GOING_DOWN cancel has already returned.
Yeah I guess that seems like it could happen.
> Take RTNL while the notifier walks cfg80211 devices and schedules owner
> cleanup work. Netdevice notifier delivery already runs under RTNL, so the
> schedule and cancel are ordered: either the work is queued before
> NETDEV_GOING_DOWN and the existing cancel drains it, or teardown runs first
> and the notifier no longer queues work for that connection owner.
That seems a bit over the top vs. just moving the cancel - why is this
the only correct fix?
johannes
next prev parent reply other threads:[~2026-07-06 11:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-19 16:25 Cen Zhang
2026-07-06 11:42 ` Johannes Berg [this message]
2026-07-06 12:24 ` Cen Zhang
2026-07-06 14:34 ` Johannes Berg
2026-07-06 15:18 ` Cen Zhang
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=4fc7e89b3203e9bc8843c848268519d34585a038.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=baijiaju1990@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=zzzccc427@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®