Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp6137856rdb; Mon, 18 Sep 2023 05:29:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEkz6hr+wka4JNGGMo9T1PJxXIIOmAUppVCXlgn8UVcahbkjFkipzF4RGmOTGk9KujKhpWl X-Received: by 2002:a05:6a21:999c:b0:15b:95ef:fee6 with SMTP id ve28-20020a056a21999c00b0015b95effee6mr2489060pzb.14.1695040171378; Mon, 18 Sep 2023 05:29:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695040171; cv=none; d=google.com; s=arc-20160816; b=Fnfw1BT24uWB0xW+jVSUmtlOcj15xl1v6DwtjfLq+FvyJZXAJ7X5zKoM2M5EdQZaFS 3AgXDmyFt5/N2k6+EPQYDz2z7MT/TaruB95IEwy01ME9GLF48x+is2qD+a84ByzrfsBp iAsjUYyLWSlCjUIptfSTKPa0NKy2Aq6W16On34uBI8NlK8bc8rSYWIOLl6HXBvkOF9VA LwCL4Hmz44fjrXe0Ar+di3LGG3Sqw5ePWQdgL8GwRn2cRJTFFeo/E0N+4AG3A4l2p2rD 45ERSoFALH07NSzGuKOVwINaOuLPDMVAgpnKL8EG+BowcE8PINyhX2gqvN1e9+bygMXw 5Dhw== 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=8uYWV4AoMIyhu5MMhm9FcP88QCKaNerTXHlHJRnVfQo=; fh=Y2IfAqdjkYQAx7XZcGq/8JceY1atOOwfX771vvMvH7o=; b=pPsNq82arKB627mUKBHG88thQaXuYsBFBnCxFWwpZ13YEaQHj2pWzrUcb4xgNPURW4 kcU1eg2+DnT7HOtUoECMXmZg0ITxq961v+UVMYFIL1yFsE4d91kjPwD3IeP8bVFQ9f5H bIa+hGVu2KSInnQpXraJFG0IMbdDqNqLmomIeDfNF1GiJyD0AkYSFwZMFZC+R00ykL7b qaGeIBDmbbbm+XKrFykFrJjwQwJJJ9cXOdDvb4JIWo8vluD+m5ZI+06BJ7xG0w5vlEzU cwLcbZDzwalAQmHq6ssxa8ADeKG5fOv8cMfi8nUZh2f+0anLnabZQ+0Z8WNWUe/i/JhT nKDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=TvO1CD2j; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id e12-20020a63db0c000000b0056949c3eda8si7696615pgg.119.2023.09.18.05.29.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 05:29:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=TvO1CD2j; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id E19EB8031C61; Mon, 18 Sep 2023 04:12:42 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233408AbjIRLMQ (ORCPT + 57 others); Mon, 18 Sep 2023 07:12:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239696AbjIRLLp (ORCPT ); Mon, 18 Sep 2023 07:11:45 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77B488F for ; Mon, 18 Sep 2023 04:11:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695035500; x=1726571500; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Niz5N6MtjyXH0uHwcBazXnt/tgjtNQgxDsdXcy3MsTg=; b=TvO1CD2j3tjOJoV3ID4PD69Ei8nDhukeiGyRLiyvM6rf72IMDhBBBAl9 ZZ9OSkO/kFUXHNYu38QbrSl1LPLJIu0cF7gzJ7A24WlsdYodpyc77m5t4 WKEYZV/+lX9K+hKtQlPcbrOKHy+McydHT2Dshw8LvRNviQ9GI1Pzvqr8R tQQ3UL9w9M14WED6qg/OVvj41T6SgQvuxbQn9PwcS9WIKG176yo9h219O uzD7cKabneCL93Z3QvZkljlqVOgW5FemBjTWAwvHkrCGCdhiJHPMAr/dZ enAEfCC2wd9CJl6tC8ettoZUd9mNu4roXyiCPNWy1D/I2kfI2Do10mOdv g==; X-IronPort-AV: E=McAfee;i="6600,9927,10836"; a="378535745" X-IronPort-AV: E=Sophos;i="6.02,156,1688454000"; d="scan'208";a="378535745" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Sep 2023 04:11:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10836"; a="861025269" X-IronPort-AV: E=Sophos;i="6.02,156,1688454000"; d="scan'208";a="861025269" Received: from guyarad-mobl.ger.corp.intel.com (HELO ggreenma-mobl2.lan) ([10.214.215.14]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Sep 2023 04:11:28 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg , Gregory Greenman Subject: [PATCH 04/18] wifi: mac80211: relax RCU check in for_each_vif_active_link() Date: Mon, 18 Sep 2023 14:10:49 +0300 Message-Id: <20230918140607.a70cf3802904.I01f456be8ce2a4fbd15e0d44302e2f7d72e91987@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230918111103.435195-1-gregory.greenman@intel.com> References: <20230918111103.435195-1-gregory.greenman@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,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 (snail.vger.email [0.0.0.0]); Mon, 18 Sep 2023 04:12:43 -0700 (PDT) From: Johannes Berg To iterate the vif links we don't necessarily need to be in an RCU critical section, it's also possible to hold the sdata/wdev mutex. Annotate for_each_vif_active_link() accordingly. 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 8d993f6ab919..7aea4787e62b 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -1942,7 +1942,7 @@ static inline bool ieee80211_vif_is_mld(const struct ieee80211_vif *vif) for (link_id = 0; link_id < ARRAY_SIZE((vif)->link_conf); link_id++) \ if ((!(vif)->active_links || \ (vif)->active_links & BIT(link_id)) && \ - (link = rcu_dereference((vif)->link_conf[link_id]))) + (link = link_conf_dereference_check(vif, link_id))) static inline bool ieee80211_vif_is_mesh(struct ieee80211_vif *vif) { -- 2.38.1