public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
* iwlmld iwl_mld_change_vif_links can return un-initilized 'err'
@ 2026-02-14 17:11 Ben Greear
  2026-02-14 17:15 ` Ben Greear
  0 siblings, 1 reply; 3+ messages in thread
From: Ben Greear @ 2026-02-14 17:11 UTC (permalink / raw)
  To: linux-wireless@vger.kernel.org; +Cc: Miri Korenblit

Hello,

I believe this method:

static int
iwl_mld_change_vif_links(struct ieee80211_hw *hw,

Can return un-initialized 'err' in case that this return path is taken:

	if (WARN_ON(!iwl_mld_error_before_recovery(mld)))
		return err;

I saw this warning hit, and then later kernel crashed with some debugfs
dentry being bogus, but not sure that is actually related.

Probably err should be initialized to -EINVAL at top of the method.

Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: iwlmld iwl_mld_change_vif_links can return un-initilized 'err'
  2026-02-14 17:11 iwlmld iwl_mld_change_vif_links can return un-initilized 'err' Ben Greear
@ 2026-02-14 17:15 ` Ben Greear
  2026-02-15  4:29   ` Korenblit, Miriam Rachel
  0 siblings, 1 reply; 3+ messages in thread
From: Ben Greear @ 2026-02-14 17:15 UTC (permalink / raw)
  To: linux-wireless@vger.kernel.org; +Cc: Miri Korenblit

On 2/14/26 09:11, Ben Greear wrote:
> Hello,
> 
> I believe this method:
> 
> static int
> iwl_mld_change_vif_links(struct ieee80211_hw *hw,
> 
> Can return un-initialized 'err' in case that this return path is taken:
> 
>      if (WARN_ON(!iwl_mld_error_before_recovery(mld)))
>          return err;
> 
> I saw this warning hit, and then later kernel crashed with some debugfs
> dentry being bogus, but not sure that is actually related.
> 
> Probably err should be initialized to -EINVAL at top of the method.
> 
> Thanks,
> Ben
> 

I guess in case that error path is interesting, looks like FW stopped
communicating and that is probably what caused the warning:

Likely at least some of this logging is from our own patches, FYI.

[  159.220486] wlan17: ieee80211_vif_set_links: new_links=0x4; dormant_links=0x0
[  159.220511] iwlwifi 0000:25:00.0: Failed to send flush command (-5)
[  159.222763] wlan17: associated
[  159.224559] wlan18: RX AssocResp from 8a:88:81:84:d9:81 (capab=0x1511 status=0 aid=192)
[  159.224563] wlan18: ieee80211_vif_set_links: new_links=0x4; dormant_links=0x0
[  159.224565] wlan18: [link 2] local address 82:fa:ed:e5:1d:de, AP link address 8e:88:a1:84:d9:81 (assoc)
[  159.224576] wlan18: ieee80211_vif_set_links: new_links=0x4; dormant_links=0x0
[  159.225503] iwlwifi 0000:25:00.0: Failed to remove station. Id=1
[  159.226598] wlan18: associated
[  159.230293] iwlwifi 0000:25:00.0: Failed to send LINK_CONFIG_CMD (action:2): -5
[  159.236374] iwlwifi 0000:25:00.0: Failed to send PHY_CONTEXT_CMD ret = -5
[  159.241885] wlan2: ieee80211_vif_set_links: new_links=0x0; dormant_links=0x0
[  159.254418] iwlwifi 0000:25:00.0: Failed to send LINK_CONFIG_CMD (action:3): -5
[  159.260503] iwlwifi 0000:25:00.0: Failed to send LINK_CONFIG_CMD (action:1): -5


Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: iwlmld iwl_mld_change_vif_links can return un-initilized 'err'
  2026-02-14 17:15 ` Ben Greear
@ 2026-02-15  4:29   ` Korenblit, Miriam Rachel
  0 siblings, 0 replies; 3+ messages in thread
From: Korenblit, Miriam Rachel @ 2026-02-15  4:29 UTC (permalink / raw)
  To: Ben Greear, linux-wireless@vger.kernel.org



> -----Original Message-----
> From: Ben Greear <greearb@candelatech.com>
> Sent: Saturday, February 14, 2026 7:15 PM
> To: linux-wireless@vger.kernel.org
> Cc: Korenblit, Miriam Rachel <miriam.rachel.korenblit@intel.com>
> Subject: Re: iwlmld iwl_mld_change_vif_links can return un-initilized 'err'
> 
> On 2/14/26 09:11, Ben Greear wrote:
> > Hello,
> >
> > I believe this method:
> >
> > static int
> > iwl_mld_change_vif_links(struct ieee80211_hw *hw,
> >
> > Can return un-initialized 'err' in case that this return path is taken:
> >
> >      if (WARN_ON(!iwl_mld_error_before_recovery(mld)))
> >          return err;

If we are under remove_added_links, this means that err is initialized.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-02-15  4:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-14 17:11 iwlmld iwl_mld_change_vif_links can return un-initilized 'err' Ben Greear
2026-02-14 17:15 ` Ben Greear
2026-02-15  4:29   ` Korenblit, Miriam Rachel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox