Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1587608rdb; Wed, 20 Sep 2023 13:31:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IES28AfEy+uZLpd2PCivTfEhNH1jqoHX5unbBz/4B8ZGo+IRD+Mst/BWJTcwP67xoeVTGaD X-Received: by 2002:a17:90b:2551:b0:268:535f:7c15 with SMTP id nw17-20020a17090b255100b00268535f7c15mr8844225pjb.0.1695241870055; Wed, 20 Sep 2023 13:31:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695241870; cv=none; d=google.com; s=arc-20160816; b=lkUhxO0oOo5UH2dmnBeEM5wInmfBiDB3dVAldwTAN79ye/Gl+4rIgceFT2l3hR6MY5 fPOkwGIij3WVjJ7pCnotfMjXsWOMQQ5zWxsVmNEx4jP+PVbqMcX4ZYFI0V8od5Fc5HIT HydXB5bBS8C/gLBceI7LxOrbOMTyvTtk7ik1pFGCnS3h3Ed9cSKKif/LvcmIfuvwXso1 JQ+411sLZuUhToza0L5K+FZZWQ20SLcTxFL3JUWNfZG7XH+nbTZfEcKi6FiQLNaUiBca 1CMsIigusZ6DZuSIb6Z9ICah1qEOoij1uUVAr3lPh0Z50VYv4db97NDn9ff4dw76058S odiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=icEk9UMaEi6YvAlazZD0Yjtzj+awf9vKgB7EtgW5/2Y=; fh=Y2IfAqdjkYQAx7XZcGq/8JceY1atOOwfX771vvMvH7o=; b=RCaYDnrfsG/NC8fi7XvEjiaT8Pd6DAvok/L03oZ3yMMIuTRBu0Az/38LM4qy4f50+y Dly8fdTlMpUABxPZccQfg0nP3NOxCLLwPzOdDQNNqxHeamHHd6Dgq+wbyeVHoHajLan6 loVTMsgWvPQ88Tyy7pQLmId/Lo3VWRSbEoAhrRZo74pOQ8/nWovbAL2lM2jy5f3ItM6q 0fvw5JWLREAWlCPFN8pwWuOZPNWnGJHSpbGCFCexZxa0VaeL94iDnlvQwvZuoTLH+Ijh 5gvVVCNLYqsHYpaF/JXYU9UUKFWPdb56fzsZsxZ7+RdE4cveVicN3mzdedI4PGcC/rvh mF2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=c8qvEu+c; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id t184-20020a6381c1000000b00578a02ee39fsi4724292pgd.334.2023.09.20.13.31.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 13:31:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=c8qvEu+c; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 1911B8286EA9; Wed, 20 Sep 2023 11:26:30 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229826AbjITS0c (ORCPT + 56 others); Wed, 20 Sep 2023 14:26:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229838AbjITS0b (ORCPT ); Wed, 20 Sep 2023 14:26:31 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62F47C6 for ; Wed, 20 Sep 2023 11:26:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695234385; x=1726770385; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=awU3IC5lzIZEWuNaKximpASNqq2AJJgi98GItNMgIzg=; b=c8qvEu+cW2ZdF9h20bQbUMMKtLaISD0Evj2Cpfs5oxHlRE2gAWSvW1xr bML4LM+WThCH+/2RpPB52HdD6SsCefeFZU6aKJ1mQ8dZ+ry1GbNkfegb4 XJNkIsKtdaw06P7iaX0dQvCqNrnPR6IWBMTn+GUlbJFYbAEv++kG/gMfr 2YxNSUwh7NS66nuFgmHwR8IcMtPOTRwTjnoT4apTV0FC/v3IY5/yv+efZ JlKl24D2H9ZrDGTiYestWNxpU3xw67FDB1UPqT/pzL3foHAY0Gn3xCVsz bzNffdRjEYiNTVTlVHcIXpUR9xjO795SaiJbrS6uJ4mAqUZCDcXcxY/Vb g==; X-IronPort-AV: E=McAfee;i="6600,9927,10839"; a="360556321" X-IronPort-AV: E=Sophos;i="6.03,162,1694761200"; d="scan'208";a="360556321" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Sep 2023 11:26:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10839"; a="723424222" X-IronPort-AV: E=Sophos;i="6.03,162,1694761200"; d="scan'208";a="723424222" Received: from dmani-mobl1.ger.corp.intel.com (HELO ggreenma-mobl2.lan) ([10.214.217.100]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Sep 2023 11:26:22 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg , Gregory Greenman Subject: [PATCH v2 05/18] wifi: mac80211: allow for_each_sta_active_link() under RCU Date: Wed, 20 Sep 2023 21:25:16 +0300 Message-Id: <20230920211508.73c3e04985f4.I52ef396d693e0e381a73eade06850137d8900948@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230920182529.659973-1-gregory.greenman@intel.com> References: <20230920182529.659973-1-gregory.greenman@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 20 Sep 2023 11:26:30 -0700 (PDT) From: Johannes Berg Since we only use this to protect the dereference and with STA mutex, we can also allow this with just RCU. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman --- include/net/mac80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 7aea4787e62b..be3d74942a4a 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -2393,7 +2393,7 @@ static inline bool lockdep_sta_mutex_held(struct ieee80211_sta *pubsta) for (link_id = 0; link_id < ARRAY_SIZE((sta)->link); link_id++) \ if ((!(vif)->active_links || \ (vif)->active_links & BIT(link_id)) && \ - ((link_sta) = link_sta_dereference_protected(sta, link_id))) + ((link_sta) = link_sta_dereference_check(sta, link_id))) /** * enum sta_notify_cmd - sta notify command -- 2.38.1