Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp520784img; Mon, 18 Mar 2019 08:16:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqyxGTgXvUlHT74a2sbbksJV8l/9rBbKJane83fIxl0l86QqqcQAoAHyzoSOY7MOMvri1o/l X-Received: by 2002:a17:902:a81:: with SMTP id 1mr20467535plp.308.1552922207778; Mon, 18 Mar 2019 08:16:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552922207; cv=none; d=google.com; s=arc-20160816; b=na5ausLpP5S5oo9oTf2yOP5aLh8DPf38FFL0AQJOWm0DhT+j7H0EkVW8S35J6hqmDS QKB+g7SWOfFjqueU+XrOSTZ2a4dUrpro7huannxcyAPBl9EPlY/Z5j7TrPLc1mnTDW66 0uMyRbdaP4886OKy/ctLZGiJHT2xZ+eeuwwqUHIhsLRHKr8bcu/xtVqzClSjOVTEU6Em a7FvIqRimJQXSXQClxXMkHeXZoPdhy9U3roHJfjLjfTowJw97NqUNv4lbfCusOggafSo zt52DTTMvVMvRNBELZLo0bnqbpheUhCf0je/yqoIufUch3TffwxDkzfveo7Yaa2dpDWK ybQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=mUzQztixUaL5Z4slN1bY3zTE9JHBDdO/8J2GDqOGk/k=; b=W0hgRG3UH3o+ZQAajb77H2gEqLHh1Eh5QCZ3Vd2bDCcPeyNErvj9Xdn1ZjJA/afYV1 4QFsIaptw2kj/P0t+j6tGQg3tTZij/AZaKFUuX1MV2iBKFwCl2nCOisARiNZdLVVTbRE 995TiQ13Z8+Sl4nflT7/RrTJlcOMGioX9I3pmgDmWo6YmVHfCtzZOw13ROgFo+/mFldP dWOOKvPpNn2b1kSXi/cerGKFsiJnvDjTEGBV/2udgnITUxOlMdLRBBxj7GCle7fumqjF 9kackYb2a0tWIoFQ7QcIlMFWcQjCdGgyfLJrW8vQZn/qM6Isis/wYOw0ZdxRhSCx7W9p wwqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=YBwIea3B; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l7si10473037plg.320.2019.03.18.08.16.32; Mon, 18 Mar 2019 08:16:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=YBwIea3B; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727421AbfCRPPh (ORCPT + 99 others); Mon, 18 Mar 2019 11:15:37 -0400 Received: from merlin.infradead.org ([205.233.59.134]:58048 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726808AbfCRPPf (ORCPT ); Mon, 18 Mar 2019 11:15:35 -0400 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:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=mUzQztixUaL5Z4slN1bY3zTE9JHBDdO/8J2GDqOGk/k=; b=YBwIea3BEe1WeRICVkJVYW+Wr p21tyFVCHdLIV7YAFD3s83HnnVIycyFLIA2IFvTPAG9Z9SHy2xx5JiLs3qmws6RGsGVebR+L1eDDM H1YvdGuSo7tI9jJeFpnPs4FkNWOrzZ3HkrdpjLq3umhmT8y1qY6MuXos+W4ExfcxD06hNkEzrjSmV iMv8lOu8NR/QHZStDpwLDmyBPvt/XQt2DpR/zxM7BSGhyd69nObshbwkvYa0gjMi+hb5GX0d12X9e pwkTmWDhoJxP+3fVCz2XmQlXSJNVcBsl3UzelzZDlTFcDkE/Oh6bEXng6oSdmixnLfTOv5jgpfaZl EQh0YuNZg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1h5tz8-0004hQ-M2; Mon, 18 Mar 2019 15:15:30 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 4E7002021950E; Mon, 18 Mar 2019 16:15:29 +0100 (CET) Date: Mon, 18 Mar 2019 16:15:29 +0100 From: Peter Zijlstra To: Steven Rostedt Cc: Prateek Sood , mingo@redhat.com, linux-kernel@vger.kernel.org, sramana@codeaurora.org, Frederic Weisbecker , Jiri Olsa Subject: Re: [PATCH] perf: extend total_ref_count usage to protect perf_trace_buf access Message-ID: <20190318151529.GT6058@hirez.programming.kicks-ass.net> References: <1552906065-24137-1-git-send-email-prsood@codeaurora.org> <20190318110250.7214cfa7@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190318110250.7214cfa7@gandalf.local.home> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 18, 2019 at 11:02:50AM -0400, Steven Rostedt wrote: > On Mon, 18 Mar 2019 16:17:45 +0530 > Prateek Sood wrote: > > > A potential race exists between access of perf_trace_buf[i] from > > perf_trace_buf_alloc() and perf_trace_event_unreg(). This can > > result in perf_trace_buf[i] being NULL during access from memset() > > in perf_trace_buf_alloc(). Can you expound?