Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2185790rda; Tue, 24 Oct 2023 15:26:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHyD79Chy+kneDHuEzwGLwrzOMgiF3prenlmirUjFtpDTkcRdJ0VAHez4EhhKsu63HYA+09 X-Received: by 2002:a17:902:e80f:b0:1c9:fdbf:296a with SMTP id u15-20020a170902e80f00b001c9fdbf296amr13597798plg.8.1698186411695; Tue, 24 Oct 2023 15:26:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698186411; cv=none; d=google.com; s=arc-20160816; b=SL+duD/3UeKVm0G089XwVwL+5u82hVWU1xz1BzoH3nBwkzHuzwzXFqfEWlm73CMOeO UKlYPxry8OOZwT84VzWpMwh7UWRCOoqNm3zEgmhmq8RfX4kDqwwDldJaRARMUtJ6vR68 UVZzoAjcDHaBrdwzkMEF7hodWUuTgnlsZ3pioWaJnQbEtZNovSdKaaEQwghQeEcmYDo4 fndfvKUeeEWmJri78duCdeJlqNw30h5RuIbB5mczj8f0tMr8M58arWl/jg3+1WNHfMPC T8YotnLivd9LXgLqyOQHGL99p+na+ghmg7tNwNhiCpmYB2ks7dWXVR/IjdI3AqZ13Bia SvQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:from:subject:references:mime-version :message-id:in-reply-to:date:dkim-signature; bh=e5GSFwgTEaHeeY2eroEgFXWdX43cKEeIAHSJl2+ftFs=; fh=NAro5oTsDEB2Or99ABwb774QJkwQSkr6EoLVqn/Yde0=; b=IxMm73nUDBLEdDeqEAWT3yafNrvObokfY0RBqwYgfWc/GpZvNPWto5R8r6u9SKccyU hxk3+eNpk7nTZlRcHIGKV2TPa9GTb7SVK9nAwM1IfGjFEa2Gn70MsZv2i2IdYzV+mlKP F85I+GTeVhoK2Zq1YJwhD5IhmKT3wC5mAm+miUCOQvarXJG9R+JlP1mTvofpOmusJG2X PaDRnvFD77rhl5A89iRoLJ+t89pz3mDxeSLe4B8SZ5IG6lLeRrgRkWHrm4zQXKOer+ia XvxrIrghCsJ5Y7+Jpdid9G4MAhWH5B60tOo246OKSOuS38L4lXS4RzO0NJK+0rGZJgPv NCXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=0I8qcJyc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id u5-20020a170902e5c500b001c89c86160bsi6005876plf.385.2023.10.24.15.26.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 15:26:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=0I8qcJyc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 396538076167; Tue, 24 Oct 2023 15:26:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234958AbjJXW0S (ORCPT + 99 others); Tue, 24 Oct 2023 18:26:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235051AbjJXWZr (ORCPT ); Tue, 24 Oct 2023 18:25:47 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 212A419AD for ; Tue, 24 Oct 2023 15:25:15 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id 3f1490d57ef6-d9a541b720aso5901684276.0 for ; Tue, 24 Oct 2023 15:25:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1698186314; x=1698791114; darn=vger.kernel.org; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :from:to:cc:subject:date:message-id:reply-to; bh=e5GSFwgTEaHeeY2eroEgFXWdX43cKEeIAHSJl2+ftFs=; b=0I8qcJyc3yn8lYPUk7aGbCk15kVD0PJnIqIpfMbU1cSVQQPlXP7U3OjyPmOQGxmjiX rjKs4Lo2BeOP+4NszZQAbgiABujNw5DuGX9G0+do0DukMj3YGTqsut8PsRGYFEBm2dhP sVzbPdXeDPLMHzkQ85eInORAXgCOG7Mux+CH/FD6ORP4rDjoCfKKFpr3KBcEvmZwI4Rx ZdQXu9y7Kt8PcmT54AEdsgCF1e/mISqGhqhrcmmRczT3x6QbW2XTiCsZM32b6pDATWW5 yEQY+LCNr7MO1+g5peninPgAi4fX4ND8OybYi1Ovx3cMuc2MguABw99JhAfadDBAmhdx yHfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698186314; x=1698791114; h=to:from:subject:references:mime-version:message-id:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=e5GSFwgTEaHeeY2eroEgFXWdX43cKEeIAHSJl2+ftFs=; b=jqs0H2Qjhqi0UHLi4tnhrhs0IKMWT+enojoKaa8UkrMS4hhE2cp3frprKVRLaxRHNC GFC8v0g0+GVvigS5C+ClBON1RzxPS8Vo47rvscTCW3QoYFLglPfCDS+VnhQ5pF0o+yLl kkJVBh/2y6rWXmcGDDOIcUMGTLuRq50LIhp68ibXI2aV9N9UNuNPaxwsHImoasdOqzhh XFbnfTaqszTT9ieCIeH4kxUY/iPaVWGNX40BRoLjpSgEi/MeIISkoRH9DjfFRXiTVnG8 7EYfN6UBJ5rErnFUD5Yf8cwQmEeT6HOI/b20sEJAj4U6FsuhXbw8xs8VQcAqheTuLEV6 2bnA== X-Gm-Message-State: AOJu0YwKA0DnUVxos+qQCR/ptCU+1pMBesVkcajzB9SpCrkLSHtQNMTV Iu4swQwQAZw9XOVSNi/d7oH2aSZnRM/w X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:93d2:18cc:4d63:45ba]) (user=irogers job=sendgmr) by 2002:a05:6902:544:b0:d13:856b:c10a with SMTP id z4-20020a056902054400b00d13856bc10amr287911ybs.3.1698186314186; Tue, 24 Oct 2023 15:25:14 -0700 (PDT) Date: Tue, 24 Oct 2023 15:23:30 -0700 In-Reply-To: <20231024222353.3024098-1-irogers@google.com> Message-Id: <20231024222353.3024098-28-irogers@google.com> Mime-Version: 1.0 References: <20231024222353.3024098-1-irogers@google.com> X-Mailer: git-send-email 2.42.0.758.gaed0368e0e-goog Subject: [PATCH v3 27/50] perf thread: Add missing RC_CHK_ACCESS From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , Nick Terrell , Kan Liang , Andi Kleen , Leo Yan , Song Liu , Sandipan Das , James Clark , Anshuman Khandual , Miguel Ojeda , Liam Howlett , Yang Jihong , Athira Rajeev , Kajol Jain , K Prateek Nayak , Sean Christopherson , Yanteng Si , Ravi Bangoria , German Gomez , Changbin Du , Paolo Bonzini , Masami Hiramatsu , liuwenyu , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 24 Oct 2023 15:26:49 -0700 (PDT) Comparing pointers without RC_CHK_ACCESS means the indirect object will be compared rather than the underlying maps when REFCNT_CHECKING is enabled. Fix by adding missing RC_CHK_ACCESS. Signed-off-by: Ian Rogers --- tools/perf/util/thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/thread.c b/tools/perf/util/thread.c index fe5e6991ae4b..eae3041408a7 100644 --- a/tools/perf/util/thread.c +++ b/tools/perf/util/thread.c @@ -385,7 +385,7 @@ static int thread__clone_maps(struct thread *thread, struct thread *parent, bool if (thread__pid(thread) == thread__pid(parent)) return thread__prepare_access(thread); - if (thread__maps(thread) == thread__maps(parent)) { + if (RC_CHK_ACCESS(thread__maps(thread)) == RC_CHK_ACCESS(thread__maps(parent))) { pr_debug("broken map groups on thread %d/%d parent %d/%d\n", thread__pid(thread), thread__tid(thread), thread__pid(parent), thread__tid(parent)); -- 2.42.0.758.gaed0368e0e-goog