All of lore.kernel.org
 help / color / mirror / Atom feed
From: Slawomir Stepien <sst@poczta.fm>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: syzkaller-bugs@googlegroups.com, linux-wireless@vger.kernel.org,
	linux-kernel@vger.kernel.org, syzbot@lists.linux.dev,
	syzbot+9bdc0c5998ab45b05030@syzkaller.appspotmail.com
Subject: Re: [PATCH 3/3] wifi: cfg80211: check if AP has been started before adding new station
Date: Tue, 8 Sep 2026 13:59:01 +0200	[thread overview]
Message-ID: <ap_4hS6M8g4u6z--@nr200> (raw)
In-Reply-To: <8934029f86b1c0e75f777185b2768f8e9755cae5.camel@sipsolutions.net>

On wrz 08, 2026 11:46, Johannes Berg wrote:
> On Tue, 2026-09-08 at 11:44 +0200, Slawomir Stepien wrote:
> > On wrz 04, 2026 11:25, Johannes Berg wrote:
> > > On Thu, 2026-08-13 at 11:04 +0200, Slawomir Stepien wrote:
> > > > 
> > > >  	case NL80211_IFTYPE_P2P_GO:
> > > > +		/* Add a new station only after the AP and link has been started */
> > > > +		link_id = wdev->valid_links ? params.link_sta_params.link_id : 0;
> > > 
> > > max() maybe?
> > > 
> > > > +		if (!wdev->links[link_id].ap.beacon_interval)
> > > > +			return -ENETDOWN;
> > > 
> > > I think the same issue might exist also for mesh, maybe address that as
> > > well?
> > > 
> > > And I think you could have a fourth patch to clean up the mac80211 code
> > > to no longer handle the "STA creation on AP_VLAN" case?
> > 
> > But is there such case?
> > The only part I think is related is the handling code when params.vlan is set. However, this code is
> > still OK. I do not see any other code that would be a good candidate for removal/change.
> > 
> > Am I missing something here?
> 
> Don't think you're missing anything, there's just the block handling
> param->vlan in add_station, it's dead code now. But why not kill it?

For the reason explained below (in my previous message).
There can still be a command from userspace with AP base interface (as wdev) with
attrs[NL80211_ATTR_STA_VLAN] set and this block will be executed in such case. Right?

> > Also, during this check, I've came to a conclusion that I will reword a bit the commit message for
> > PATCH 1/3, since userspace can still add STA to AP_VLAN in one go, using
> > attrs[NL80211_ATTR_STA_VLAN] and that's fine, since the wdev would be the base AP interface, so all
> > check will happen.
> 
> Sure :)

-- 
Slawomir Stepien

  reply	other threads:[~2026-09-08 11:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-13  9:04 [PATCH 1/3] wifi: cfg80211: do not support direct add of station to AP_VLAN interfaces Slawomir Stepien
2026-08-13  9:04 ` [PATCH 2/3] wifi: cfg80211: move link_id validation earlier in nl80211_new_station() Slawomir Stepien
2026-08-13  9:04 ` [PATCH 3/3] wifi: cfg80211: check if AP has been started before adding new station Slawomir Stepien
2026-09-04  9:25   ` Johannes Berg
2026-09-07  9:46     ` Slawomir Stepien
2026-09-07  9:47       ` Johannes Berg
2026-09-08  9:44     ` Slawomir Stepien
2026-09-08  9:46       ` Johannes Berg
2026-09-08 11:59         ` Slawomir Stepien [this message]
2026-09-08 12:25           ` Johannes Berg
2026-09-08 13:35             ` Slawomir Stepien
2026-09-08 13:37               ` Johannes Berg
2026-08-13 13:31 ` [syzbot ci] Re: wifi: cfg80211: do not support direct add of station to AP_VLAN interfaces syzbot ci

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=ap_4hS6M8g4u6z--@nr200 \
    --to=sst@poczta.fm \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=syzbot+9bdc0c5998ab45b05030@syzkaller.appspotmail.com \
    --cc=syzbot@lists.linux.dev \
    --cc=syzkaller-bugs@googlegroups.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.