Re: [bug report] iwlwifi: integrate with iwlmei
From: Dan Carpenter <hidden>
Date: 2021-11-30 09:08:00
On Tue, Nov 30, 2021 at 08:09:48AM +0000, Grumbach, Emmanuel wrote:
Hi Dan,quoted
Hello Emmanuel Grumbach, The patch 6d19a5eba5cd: "iwlwifi: integrate with iwlmei" from Nov 12, 2021, leads to the following Smatch static checker warning: drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c:2640 iwl_mvm_start_ap_ibss() error: NULL dereference inside function '__iwl_mvm_mac_set_key()'Where in __iwl_mvm_mac_set_key() ? This function should be able to cope with with a NULL sta I think. I don't really see how this could be related to my patch since iwlmei is not related to AP mode at all. I also moved to that commit, but the line numbers don't match, so I am a bit confused.
I'm on yesterday's linux-next. The patch moves the mvmsta assignment to
the start of the function.
mvmsta = iwl_mvm_sta_from_mac80211(sta);
^^^^
It introduces a couple other Smatch warnings as well.
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c:3643 __iwl_mvm_mac_set_key() warn: variable dereferenced before check 'sta' (see line 3594)
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c:3773 __iwl_mvm_mac_set_key() warn: variable dereferenced before check 'sta' (see line 3594)
regards,
dan carpenter