Skip to contentSkip to conversation

iwlmld iwl_mld_change_vif_links can return un-initilized 'err'

DISCUSSION Ben Greear 2 participants 3 messages Feb 14 – Feb 15

lore
Share & tools
lore
author
#1 lore raw
In reply to Ben Greear
Quoted 12 lines · Ben Greear

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;

Quoted 8 lines

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

Signature · 2 lines
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com

Ben Greear

author
#0 lore raw

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

Signature · 2 lines
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com
#2 lore raw
In reply to Ben Greear
Quoted 21 lines

-----Original Message-----
From: Ben Greear <[email protected]>
Sent: Saturday, February 14, 2026 7:15 PM
To: [email protected]
Cc: Korenblit, Miriam Rachel <[email protected]>
Subject: Re: iwlmld iwl_mld_change_vif_links can return un-initilized 'err'

Quoted 11 lines · Ben Greear

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.