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 16:34:07 +0200 [thread overview]
Message-ID: <a2dd36c58cb228693428c5a5abe3e14ef6376e7c.camel@sipsolutions.net> (raw)
In-Reply-To: <CAFRLqsXDDO=fzwwe5eNEkS=qUjf9=2X=NrX+LcZ+TNkMN+fF5Q@mail.gmail.com> (sfid-20260706_142458_242277_5D2336AE)
On Mon, 2026-07-06 at 20:24 +0800, Cen Zhang wrote:
> Hi Johannes,
>
> Thanks for your review and comments.
>
> > What's that supposed to mean? Of course there's ordering between those
> > two things?
>
> You're right, that wording was imprecise.
>
> I didn't mean that NETDEV_GOING_DOWN and NETDEV_UNREGISTER are unordered with
> respect to each other. What I meant is that the NETLINK_URELEASE notifier's
> schedule_work() site is not ordered against the teardown-side
> cancel_work_sync() for the same wdev.
Yeah, fair.
> I chose RTNL because netdev notifier delivery is already serialized by RTNL,
> so it orders the existing schedule_work() producer against the existing
> cancel_work_sync() with a small change. But if you prefer moving the cancel,
> I can rework v2 in that direction.
>
> My only concern with simply moving a final cancel into
> _cfg80211_unregister_wdev() is that this path is called with the wiphy mutex
> held, while cfg80211_autodisconnect_wk() also takes the wiphy mutex. So I
> think the final drain would need to happen after the RCU readers are gone,
> but outside the wiphy lock and before the wdev/netdev lifetime can end.
Sounds like maybe it should just be a wiphy work so we don't have to
worry about the locking at all?
johannes
next prev parent reply other threads:[~2026-07-06 14:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-19 16:25 [PATCH] wifi: nl80211: serialize socket owner release with netdev teardown Cen Zhang
2026-07-06 11:42 ` Johannes Berg
2026-07-06 12:24 ` Cen Zhang
2026-07-06 14:34 ` Johannes Berg [this message]
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=a2dd36c58cb228693428c5a5abe3e14ef6376e7c.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