Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a9560029 authored by Sara Sharon's avatar Sara Sharon Committed by Luca Coelho
Browse files

iwlwifi: mvm: fix accessing fw_id_to_mac_id



Access should be by rcu_dereference. Issue was found by sparse.

Fixes: 65e25482 ("iwlwifi: mvm: use firmware station PM notification for AP_LINK_PS")
Signed-off-by: default avatarSara Sharon <sara.sharon@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent 6be3b6cc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2401,7 +2401,7 @@ void iwl_mvm_sta_pm_notif(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb)
		return;

	rcu_read_lock();
	sta = mvm->fw_id_to_mac_id[notif->sta_id];
	sta = rcu_dereference(mvm->fw_id_to_mac_id[notif->sta_id]);
	if (WARN_ON(IS_ERR_OR_NULL(sta))) {
		rcu_read_unlock();
		return;