Search Linux Wireless

[bug report] wifi: iwlwifi: mvm: add support for the new STA related commands

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Miri Korenblit,

The patch 006c152ac9e5: "wifi: iwlwifi: mvm: add support for the new
STA related commands" from Mar 14, 2023, leads to the following
Smatch static checker warning:

	drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c:239 iwl_mvm_mld_rm_int_sta()
	error: NULL dereference inside function

drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c
    225 static int iwl_mvm_mld_rm_int_sta(struct iwl_mvm *mvm,
    226                                   struct iwl_mvm_int_sta *int_sta,
    227                                   bool flush, u8 tid, u16 *queuptr)
    228 {
    229         int ret;
    230 
    231         lockdep_assert_held(&mvm->mutex);
    232 
    233         if (WARN_ON_ONCE(int_sta->sta_id == IWL_MVM_INVALID_STA))
    234                 return -EINVAL;
    235 
    236         if (flush)
    237                 iwl_mvm_flush_sta(mvm, int_sta, true);
    238 
--> 239         iwl_mvm_mld_disable_txq(mvm, NULL, queuptr, tid);
                                             ^^^^
You can't pass a NULL sta pointer.  It will crash.

    240 
    241         ret = iwl_mvm_mld_rm_sta_from_fw(mvm, int_sta->sta_id);
    242         if (ret)
    243                 IWL_WARN(mvm, "Failed sending remove station\n");
    244 
    245         iwl_mvm_dealloc_int_sta(mvm, int_sta);
    246 
    247         return ret;
    248 }

regards,
dan carpenter



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux