Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3427930rdh; Mon, 27 Nov 2023 14:11:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IH4lYmf6dSyfyMjEcbQy++ink86ggRwLSEjllEuhd8AAuROKHWT42arPEcAFeizGXjJxkna X-Received: by 2002:a54:4386:0:b0:3b8:8247:71d with SMTP id u6-20020a544386000000b003b88247071dmr1954798oiv.18.1701123075817; Mon, 27 Nov 2023 14:11:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701123075; cv=none; d=google.com; s=arc-20160816; b=QJQyAkceoT404ErGA9YdSNos1Qgay5QHfGh2c56vXFsgangr630m+E2AEl6Nm/FEgD SaqIH0nuFLvkJ9N/kPgebkIix0MkfGurd9au+DpSZXdHn/0HxBoonYFfUh4NZsBCJrSF MFa63DkwoCRGEikFeGL0KzB/fFt/h9fCDFihwO4OaipJtWS1Chvd2CFNLm8X79obckAs dcIKADQhPTcxxuJ6SmTdyXDQwZHkB6iuI3KVPqjyBj0AfVzUXAdf0qh9o/McpfDqC2Ra hkjulR6K3tg6XkebG1R31CvLQWdLKqTI/5yQ4D7PA5kI5UfqlKUx9exMowYTmNDpg5DJ 2QBw== 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=WzfDI2A+Dhir6Mech0OT0IIjPNEDsBuzrIL0dTnaONc=; fh=Io7x3OacpefNRRNKoYAzVE0aWTDwD7FRzyCdD1e3AN4=; b=ZecnKr4/DerqIeSqaHVpwjVrdZDxEblZaIh+QxMRJSko2xcZxolDWvgC3OZ5fM0BVP nEFxGW1EESW7cm+Apx12uqI81tU+FzLAJ2k+KAAR2UPwQUAhRs9IpsGkHhRnqyEisw3G tGpqBq+m+rtI9/R9RlZc7LSLjenR4dcXGykUQNGxc1lhqr+H7tx3emmD89rRaBHSxvcM ysOP5nEeo2rtWQbREcIElOcz8Jh8smYBsNMsxbFlDR+oETjfJu1yw0pTUmxsB5znHO7J IfKzOIfJluNUOFIpP3kQl4WfV8rkALHhqSZYitzRy3R8SdqN/vCkyy+8AH62uWk749aZ X64A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=WPCl6vSI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id l1-20020a635701000000b005c24fb6927csi10772946pgb.656.2023.11.27.14.11.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 14:11:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-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=@google.com header.s=20230601 header.b=WPCl6vSI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (Postfix) with ESMTP id EF4EA8107567; Mon, 27 Nov 2023 14:11:12 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233635AbjK0WKy (ORCPT + 99 others); Mon, 27 Nov 2023 17:10:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233780AbjK0WKL (ORCPT ); Mon, 27 Nov 2023 17:10:11 -0500 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B3211FD5 for ; Mon, 27 Nov 2023 14:09:56 -0800 (PST) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-5d032ab478fso22182097b3.0 for ; Mon, 27 Nov 2023 14:09:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1701122996; x=1701727796; 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=WzfDI2A+Dhir6Mech0OT0IIjPNEDsBuzrIL0dTnaONc=; b=WPCl6vSIkYCmhmu5akCPCP2wiA+siWnPsU1ovqYyvnlCilvAj/f6d/b7vgwr+E/diC Ba6bBizXb1y82anhXo8OS5HdKsXpKCjA72oMgZuGAhFyaGlM6TMycIJBW9NdDAqdzyO9 te6IJFlwKLbAZxtZbDSSMlhAZfqszic+zOL7Ercp+Q3xfVjP1Mg/DeWRNDcNYsY8m4PE 5agcqzjazPelhn8a3OdtyzNGmjQHFNE1NUbmPvqx0AVDmc5rnl07tzOO47U5JmptxV37 HousULPdBYyjJfZUeAIy95e8Afl3enRxsd2XgUbJzEi8G5D9WLdQA+K+9FdqpMjMgOiB jL5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701122996; x=1701727796; 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=WzfDI2A+Dhir6Mech0OT0IIjPNEDsBuzrIL0dTnaONc=; b=IkPcVz+e3ihS2zH7oMNYhW8aoh7K1+wJzPCiUXPPAH5MqrjN2/cBApSDeeJCE/Tb1e jhdDMcIGgiUaAVAR55u9WSFj8ne+4K0aXBxuHc3of3tmi4yw2hO7nvtCBJaZ5D9rxwmw IwvCsECeAdlb5VBenc2zFzRiF2r2ZaP58voPVJYpYQIIV7/dG1mpMPtNqK4uQubDZmk2 iPkJj+UyYSpm+ar2jesl5SUFR9GeBiKosxh5fpm18/fs59kchQFhvAYhqxbP2HNrBa88 aAZSPSzCk7aTdfT0+M9CfkBQ9eAYlishvG1EAKY5cG15nBF9KfUd2Q2Bz1xC5VlbneAC Jz8Q== X-Gm-Message-State: AOJu0YxDtO/xRWiZkCOuuKS3Px/oULPykLcqICKFLNPtMZpApkhg8Et7 nJEJjH28RFgJtCPIIATuSomASvaWa2wM X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:829:6e77:9093:f39b]) (user=irogers job=sendgmr) by 2002:a05:690c:2e87:b0:5cc:3d0c:2b60 with SMTP id eu7-20020a05690c2e8700b005cc3d0c2b60mr369861ywb.4.1701122996145; Mon, 27 Nov 2023 14:09:56 -0800 (PST) Date: Mon, 27 Nov 2023 14:08:26 -0800 In-Reply-To: <20231127220902.1315692-1-irogers@google.com> Message-Id: <20231127220902.1315692-15-irogers@google.com> Mime-Version: 1.0 References: <20231127220902.1315692-1-irogers@google.com> X-Mailer: git-send-email 2.43.0.rc1.413.gea7ed67945-goog Subject: [PATCH v5 14/50] perf thread: Add missing RC_CHK_EQUAL 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 , Kajol Jain , Athira Rajeev , Huacai Chen , Masami Hiramatsu , Vincent Whitchurch , "Steinar H. Gunderson" , Liam Howlett , Miguel Ojeda , Colin Ian King , Dmitrii Dolgov <9erthalion6@gmail.com>, Yang Jihong , Ming Wang , James Clark , K Prateek Nayak , Sean Christopherson , Leo Yan , Ravi Bangoria , German Gomez , Changbin Du , Paolo Bonzini , Li Dong , Sandipan Das , liuwenyu , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Guilherme Amadio 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,T_SCC_BODY_TEXT_LINE, 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 morse.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 (morse.vger.email [0.0.0.0]); Mon, 27 Nov 2023 14:11:13 -0800 (PST) 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_EQUAL. 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..b9c2039c4230 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_EQUAL(thread__maps(thread), 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.43.0.rc1.413.gea7ed67945-goog