Received: by 2002:a05:7412:b795:b0:e2:908c:2ebd with SMTP id iv21csp554509rdb; Thu, 2 Nov 2023 11:00:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEZ7hQyc96xYQezxOxehStwkI42YOD7o5dP5XewumNxz5wAqiklEFKv7BbT15i6aD2I4mtU X-Received: by 2002:a17:90a:17a7:b0:27d:a14c:eba6 with SMTP id q36-20020a17090a17a700b0027da14ceba6mr16236839pja.21.1698948044934; Thu, 02 Nov 2023 11:00:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698948044; cv=none; d=google.com; s=arc-20160816; b=YPwyzxoBMU4jYlTUByL3zs2IZq3wmrOUeXVRYiRG8boSaFeLLiA4NIqOVqXCHM1klY 6uZGOVlEpitD6Qa7XvuVU/PTmKu02kqsIrGMJgkpC400xp5lNynvKRkyiMsojHlfmS/e OkEI2hLgumisvxyPEyuQgiRBcrpDhyZ82WJBfqW4QS36U7anPDwANyGmMXcR9dn9enXH g9y3CfMEU8SP/JCULwTI3m69tbcovE9ZfCTqVcSz+R0VlSa/CfyNH9sa24DhC04zTyty KFsumbkJabaSGS764rpE9M4ihZBIN+LImv8B6kNNg5dLWwLotgujXWxtqVbQgG5D7QFN 7IOg== 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=2wyNJQL6CFNlRT5cB8RLt/NVGX6O9HhWy8v7f/NT0so=; fh=z1KcSqUpYQ9oC4uLSeIkhAYTnJ2bvP0QbNW2xqV5NqA=; b=FxewwqQ6+9kcN4ps6ETjdz2Ot9nFB71Tlzq6HT/mGSa1JhOJEedfbQcR5IANVjsRNX YT998mmrPG/krXS3121nxOxxw76Dp9xawc7qMfWwA8Z8rmX3uyN8wdg6tG6rFyU3TXjT qbXQAREiTyYMuSGL400NxIGNXh1ZtN+JziJyLJoLlWGpN128pcLQocl4c91HRDLDXPLn oq4bfPN7RST0xKyd40LkrwJ6iif9DWdp1hh/sgRWtvxQ5/mxwfsPJ4iCuhypzhU2KOxq 0tsNyOWyJsGj9uY9CNBH/CQrt2somqnJlYUh4Y4pPt/ZRsX+3GAdiRoaRYdWuWGG1H0K ZRlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="J4/rq3Gf"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id u10-20020a17090abb0a00b00280166dcf08si86781pjr.172.2023.11.02.11.00.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 11:00:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b="J4/rq3Gf"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id 4518182155C8; Thu, 2 Nov 2023 11:00:33 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377267AbjKBR7g (ORCPT + 99 others); Thu, 2 Nov 2023 13:59:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377186AbjKBR65 (ORCPT ); Thu, 2 Nov 2023 13:58:57 -0400 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 3FD8BD43 for ; Thu, 2 Nov 2023 10:58:36 -0700 (PDT) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-5af9b0850fdso17011137b3.1 for ; Thu, 02 Nov 2023 10:58:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1698947915; x=1699552715; 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=2wyNJQL6CFNlRT5cB8RLt/NVGX6O9HhWy8v7f/NT0so=; b=J4/rq3GfGSJmb3gADePg0FlMl9oi2h0BAEhZI7ydS69Tt7/lUZYn1m6WER38PmoaIi SCgU5uW9O/w5dqnAJgTyTkUf8w7fpTk7hiri3Rsd/nNug21HcABFykBIkTU6mX7oX78j nde98Rt9QJmKiuEBOgDqSmvanWO3HMMUQ+Jc4EcPuNlAxqDZpzL1j4oYezLdfWpXNH2L ZPbV1+W7tc0y0jJlkUR2QVUMAXBMJqwzUIKOL74HEgWaakcqAn0i+XWV0aVvJT1Mobx7 CTXCBkxy/o8M1zwEvdp9fQg9s8RMaKQU9kF5UNfqQyNAO8b1Xm5GnXXl7f5ENN/HCUIS HLgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698947915; x=1699552715; 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=2wyNJQL6CFNlRT5cB8RLt/NVGX6O9HhWy8v7f/NT0so=; b=jFRALHqRP8Fen8ipTPRZW+HLmQO4BgG7CEypneztjHUr72unoF39FvukWDEeBJ/SU0 W+Es+p3Tpu11AO94EFy9+I5C4rGgMPrhAhsvkJzWzLxBrF/ho8wQu/EWseWhaFfjacrw JXwl9k7IOgB3fIaRxWU6moEAnF0KJl06XYRdCZk8CqWRv59JltiDv9exyYGYhxNlxT2W oFOeIHFTcNJIMYOhK7PKS1DdD4S18SvWh80KYYfErU8cIzGNSo2FXlA7AajLZN3u1V7K etk26ViwisDrqwmkVujDzM9nTRtlqUXOy9OD0P9eJxWhoxSpVmn5IAZQGubmOx9izmJh m2bQ== X-Gm-Message-State: AOJu0Yzomvq3n5hNIN9XmkkZlWvA+XbnxrB/tGKBG8FWvmWuQaoCs/Pa mS8vCk68p33t+sLvxJLA9ZdSJCV9nhsR X-Received: from irogers.svl.corp.google.com ([2620:15c:2a3:200:bb34:df9c:836c:afca]) (user=irogers job=sendgmr) by 2002:a05:6902:1083:b0:d9a:c3b8:4274 with SMTP id v3-20020a056902108300b00d9ac3b84274mr460458ybu.7.1698947915222; Thu, 02 Nov 2023 10:58:35 -0700 (PDT) Date: Thu, 2 Nov 2023 10:56:59 -0700 In-Reply-To: <20231102175735.2272696-1-irogers@google.com> Message-Id: <20231102175735.2272696-18-irogers@google.com> Mime-Version: 1.0 References: <20231102175735.2272696-1-irogers@google.com> X-Mailer: git-send-email 2.42.0.869.gea05f2083d-goog Subject: [PATCH v4 17/53] 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 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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Thu, 02 Nov 2023 11:00:33 -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_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.42.0.869.gea05f2083d-goog