Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp360240pxu; Fri, 23 Oct 2020 02:44:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzA0xvJnNpxTzB2rOkUY1NitjmhMXV7hgE/dYhv0hm+NYtlyi3kz+m9NAUZ96H0hXNWia+r X-Received: by 2002:a17:906:6d89:: with SMTP id h9mr1052716ejt.152.1603446289204; Fri, 23 Oct 2020 02:44:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603446289; cv=none; d=google.com; s=arc-20160816; b=p3PBgi5YR0SpJqcjk6B02frYjtqmL7LGVP+PZH1bBjEKcgSL8+ZQfyA289gdG98rCd Kuqq8/HiFS1GUAq7TmGgJI4nr1JKnL0gKZwPvuk1ONxb8iiLAtzVicnZvD2ixyQfmDzK rpQGQZkxjxGr7uvH11bD1sgO/f4Br24d5StQJNb9XsKIbBIqhozzbf7TeQ81dTcy3lyI 7dKU+7R+qow05PRhGtV9mwENvUXP0TND3vqKmi/XjZcNtnDeoKWeMmXVdk3eTf2XxlLV 8imKeHPN4Cmlk4/lsulk1WUZ/77p+xEBXSvPTWI+TtZ2RvNWoMT0ioTR5MBZgIM4/1mK o9Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=71opRXk+CVt0coUz0FPhVzMU7R20E+INO+PfC/78r9s=; b=tep8HexfNg4jh6n59Iw6AV6iSviPD+l4Df5uBuOj9GewOkVGiwyww8W8wo6fyDN9yW 7eCeFeicq5WpZH03/mcSDWzpuBJJ+C02f9P5hCMhYUGv25Iyf1WOu+p0+lEOWuGn0cUp i6JQiNP1O+ALd1YJ13N2swRPpXWkxg7FLUlhpYis+glt3Pwli1qQas43w/rWTtePUy30 1rEB8JP8czUVCyvILdpfoKS/379g3duKhK1KN1FYMUOeqIpLxE151jWTdZ+FQ+KRCGD/ lIbRQEeQOnvoYJIdD5nysZKBYIvyS0VDdadjJSZF9Mg/ZLiiTMSm608O23zRolm9UdJq ojbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=LCt7s0vs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w23si424449eds.571.2020.10.23.02.44.24; Fri, 23 Oct 2020 02:44:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=merlin.20170209 header.b=LCt7s0vs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S461622AbgJWJl0 (ORCPT + 99 others); Fri, 23 Oct 2020 05:41:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S461592AbgJWJl0 (ORCPT ); Fri, 23 Oct 2020 05:41:26 -0400 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34E58C0613CE; Fri, 23 Oct 2020 02:41:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=71opRXk+CVt0coUz0FPhVzMU7R20E+INO+PfC/78r9s=; b=LCt7s0vsBWeNbFSqkiV4Hp8kGZ QtaThUO+HSqDN+ZhLsve9PrO3O/pZgUFRBq8PQ/XdJBL9ax2EJiDMn7njL7HpM//UfsWstDCOMq0d d4GUW8h92cGdr+DjhPnGjt+vOiNDKDigpj81EOphkW1mai1r56dek13logIPV8FMvFOTBOY0ELhWI BYeFSx3/GwueGQH+MQ8vJVHUk62MQIOjwYgn9Q9WGb/Ii5qjRt0DILOyii5zZf+JJ6FVj05kXBr5B N9PcJ+BJS/iJYiYp7ciesNoGqUYd7LkPiz+3GSzPKczgPTu3qyIuDF2eKzCjSmm9sPOvEfFpPQwua o3CsVZEQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kVtZU-0005So-Ov; Fri, 23 Oct 2020 09:41:16 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 698B7304D2B; Fri, 23 Oct 2020 11:41:15 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 5005E2B945263; Fri, 23 Oct 2020 11:41:15 +0200 (CEST) Date: Fri, 23 Oct 2020 11:41:15 +0200 From: Peter Zijlstra To: Suzuki Poulose Cc: Mathieu Poirier , Sai Prakash Ranjan , Mike Leach , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , coresight@lists.linaro.org, Stephen Boyd , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCHv2 2/4] coresight: tmc-etf: Fix NULL ptr dereference in tmc_enable_etf_sink_perf() Message-ID: <20201023094115.GR2611@hirez.programming.kicks-ass.net> References: <20201022113214.GD2611@hirez.programming.kicks-ass.net> <20201022150609.GI2611@hirez.programming.kicks-ass.net> <788706f2-0670-b7b6-a153-3ec6f16e0f2e@arm.com> <20201022212033.GA646497@xps15> <20201023073905.GM2611@hirez.programming.kicks-ass.net> <174e6461-4d46-cb65-c094-c06ee3b21568@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <174e6461-4d46-cb65-c094-c06ee3b21568@arm.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 23, 2020 at 09:49:53AM +0100, Suzuki Poulose wrote: > On 10/23/20 8:39 AM, Peter Zijlstra wrote: > > So then I don't understand the !->owner issue, that only happens when > > the task dies, which cannot be concurrent with event creation. Are you > > Part of the patch from Sai, fixes this by avoiding the dereferencing > after event creation (by caching it). But the kernel events needs > fixing. I'm fundamentally failing here. Creating a link to the sink is strictly event-creation time. Why would you ever need it again later? Later you already have the sink setup.