From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:43942 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755137AbdEKOQ6 (ORCPT ); Thu, 11 May 2017 10:16:58 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sara Sharon , Luca Coelho Subject: [PATCH 4.10 058/129] iwlwifi: mvm: fix accessing fw_id_to_mac_id Date: Thu, 11 May 2017 16:11:46 +0200 Message-Id: <20170511141224.045334302@linuxfoundation.org> In-Reply-To: <20170511141220.039886885@linuxfoundation.org> References: <20170511141220.039886885@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: stable-owner@vger.kernel.org List-ID: 4.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Sara Sharon 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 Signed-off-by: Luca Coelho Signed-off-by: Greg Kroah-Hartman --- 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;