Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1639775 > unrolled thread

[PATCH 4.10 058/129] iwlwifi: mvm: fix accessing fw_id_to_mac_id

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2017-05-11 17:50 +0200
Last post2017-05-11 17:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4.10 058/129] iwlwifi: mvm: fix accessing fw_id_to_mac_id Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-05-11 17:50 +0200

#1639775 — [PATCH 4.10 058/129] iwlwifi: mvm: fix accessing fw_id_to_mac_id

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-05-11 17:50 +0200
Subject[PATCH 4.10 058/129] iwlwifi: mvm: fix accessing fw_id_to_mac_id
Message-ID<tFYvN-8cz-41@gated-at.bofh.it>
4.10-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Sara Sharon <sara.sharon@intel.com>

commit a95600294157ca7527ee7c70249fb53e09d8c566 upstream.

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

Fixes: 65e254821cee ("iwlwifi: mvm: use firmware station PM notification for AP_LINK_PS")
Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
@@ -2411,7 +2411,7 @@ void iwl_mvm_sta_pm_notif(struct iwl_mvm
 		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;

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web