Return-path: Received: from mail-ee0-f50.google.com ([74.125.83.50]:44297 "EHLO mail-ee0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750789AbaBCUj3 (ORCPT ); Mon, 3 Feb 2014 15:39:29 -0500 Received: by mail-ee0-f50.google.com with SMTP id d17so3946147eek.9 for ; Mon, 03 Feb 2014 12:39:28 -0800 (PST) From: Emmanuel Grumbach To: linux-wireless@vger.kernel.org Cc: Johannes Berg , Emmanuel Grumbach Subject: [PATCH 1/8] iwlwifi: mvm: make local pointer non-static Date: Mon, 3 Feb 2014 22:39:15 +0200 Message-Id: <1391459962-7381-1-git-send-email-egrumbach@gmail.com> (sfid-20140203_213933_929769_9F84580D) In-Reply-To: <52EFFCE8.6070505@gmail.com> References: <52EFFCE8.6070505@gmail.com> Sender: linux-wireless-owner@vger.kernel.org List-ID: From: Johannes Berg The address pointer used in the function shouldn't be static since it's local data only. Having it static causes races if a single machine has two devices, as the pointer would be shared between instances. Signed-off-by: Johannes Berg Signed-off-by: Emmanuel Grumbach --- drivers/net/wireless/iwlwifi/mvm/sta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/iwlwifi/mvm/sta.c b/drivers/net/wireless/iwlwifi/mvm/sta.c index ec18121..3397f59 100644 --- a/drivers/net/wireless/iwlwifi/mvm/sta.c +++ b/drivers/net/wireless/iwlwifi/mvm/sta.c @@ -652,7 +652,7 @@ int iwl_mvm_send_bcast_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif, { struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); static const u8 _baddr[] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}; - static const u8 *baddr = _baddr; + const u8 *baddr = _baddr; lockdep_assert_held(&mvm->mutex); -- 1.7.9.5