Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1525066rdb; Wed, 20 Sep 2023 11:29:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEJ3ChN+4xNBhEaBZOOgw5D84cAa2RS9u7DgPnNHsu5RTAJNi7YMMm7EoH1dizpNAzoKHVo X-Received: by 2002:a17:902:a407:b0:1c3:ed30:ce0a with SMTP id p7-20020a170902a40700b001c3ed30ce0amr3122657plq.19.1695234598135; Wed, 20 Sep 2023 11:29:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695234598; cv=none; d=google.com; s=arc-20160816; b=A0rup+uYCpqdIOR8SfLqh9Z8aiEYDHDTy6tamN80Po8cAr/TR2qvTatfwzavkf/yCa KNoBGwOu+4nBtJ49QNIiUdGjmElLii9owa89i0/G1q37xPZoMqflMqqzPt86nUN2s9KW fel8IweJB508QZgE4t9Z9wWxiTuAUvcogp2TU2bl7rGS5eBFTMob+1jfPuTk1MpmMInV eZkT/nQVa7h8+QAkv/WtqLj44hl9BCK2+turV9+ep+rxarYrh/mrJEOzuOz6M7vVZaTw H0H16dd0CrlQBJ042h1U+xEqLUKpAkZCflC7Y5qlD9PdNguwA4szhzFYoioI5CnhsXNb q0Ig== 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=GYEwbmdy9uiw79/KvVL3cfM2CeBZ6wQHO+3bAksVNt28mXFX83bZCmUSy/xh39Ifgw OqxH3e68T3iv4NCXLvQZYJqHVA33/rQMPXzMnKjKA6d4XrW2AcQ7Wyc8CLK/2uLqyXBe cs3c3I6GaTc7gfFsai7CZROi1KmyaWneRfgRPvoRMflsOULVWTmFptFpikoKaYYakWZR BX6ItcjCHhVZEWE8KIHs39IQtLcpWE0b7o1siTkEs64jvnp05VIx/UnoE9/Kqhr4FXDc i3Gem708wBfE3wEMlsRWLYo2nmfGFXWAvWke/jepnghFzNJbncgNKXIJasVXHs9yzltV NQCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=dbz6oSkw; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id v13-20020a170903238d00b001bba90f8b73si11947441plh.78.2023.09.20.11.29.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 11:29:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=dbz6oSkw; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (Postfix) with ESMTP id B617D80E4FEC; Wed, 20 Sep 2023 11:26:52 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229840AbjITS0b (ORCPT + 56 others); Wed, 20 Sep 2023 14:26:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229818AbjITS0a (ORCPT ); Wed, 20 Sep 2023 14:26:30 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DD6A4E4 for ; Wed, 20 Sep 2023 11:26:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695234383; x=1726770383; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Niz5N6MtjyXH0uHwcBazXnt/tgjtNQgxDsdXcy3MsTg=; b=dbz6oSkwLDKRuS/VbnlJZsQ5nn+efCtC7zNKNCdkXpswXMLDSO0cFZlo +m1dhS06hu2mod+zbK+/fqmqSECug5UtlsR55Yd9RtEVWBg4ZKUx1mX3l jth3SP2pElLXoJhYvEfgsdDGLr+QW2F7ZAfiN1AxvYmup7BbRUd446VbB DcDf0H8ZDX8iGA8cwoUP7c3ON4fEwfmsWzW7UkQsLsqiGri/KtVcdQfBK 5dTpeFrxspLkjznQgJxU4MkZuEa7g7/5Uvu0U/VHls0S/N5e3fg6bhkoY 2+lWrApBVwlHVcWjoSC0UIgjXGOIgxF9l6EvzbO1NlEj8/U+l06d9/FR9 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10839"; a="360556318" X-IronPort-AV: E=Sophos;i="6.03,162,1694761200"; d="scan'208";a="360556318" 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:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10839"; a="723424217" X-IronPort-AV: E=Sophos;i="6.03,162,1694761200"; d="scan'208";a="723424217" 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:20 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg , Gregory Greenman Subject: [PATCH v2 04/18] wifi: mac80211: relax RCU check in for_each_vif_active_link() Date: Wed, 20 Sep 2023 21:25:15 +0300 Message-Id: <20230920211508.858921bd2860.I01f456be8ce2a4fbd15e0d44302e2f7d72e91987@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=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email 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 (morse.vger.email [0.0.0.0]); Wed, 20 Sep 2023 11:26:52 -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