Re: [PATCH wireless-next v4 11/21] wifi: nl80211/cfg80211: define API to notify SMD Drain completion
From: Johannes Berg
Date: Mon Nov 16 2026 - 06:40:05 EST
On Sat, 2026-11-14 at 00:08 +0530, Pooventhiran G wrote:
>
> On 11/11/2026 12:31 am, Johannes Berg wrote:
> > On Fri, 2026-11-06 at 13:28 +0530, Pooventhiran G wrote:
> > >
> > > +/**
> > > + * cfg80211_notify_smd_drain_completion - notify userspace about downlink drain
> > > + * early termination.
> > > + * @wdev: wireless device corresponding to the AP MLD
> > > + * @sta_addr: non-AP MLD address for which DL draining is being terminated
> > > + *
> > > + * Should be called under wiphy_lock.
> >
> > "Should" doesn't really work here (it's either must or not), but anyway,
> > why, it's completely unnecessary?!
> >
>
> wdev/dev access in nl80211_notify_smd_drain_completion is not protected again
> and it might race with a DELETE_INTERFACE. But I think instead of mandating
> wiphy_lock here, would it be okay if I changed it to use the wiphy_work_queue
> to post this event which provides safe access?
Basically same comment as on patch 10. I don't see a reason to make it
async under these circumstances, but it could obviously be atomic.
johannes