From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754063AbcAVToJ (ORCPT ); Fri, 22 Jan 2016 14:44:09 -0500 Received: from mail-pf0-f178.google.com ([209.85.192.178]:34661 "EHLO mail-pf0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751292AbcAVToH (ORCPT ); Fri, 22 Jan 2016 14:44:07 -0500 Date: Fri, 22 Jan 2016 11:44:03 -0800 From: Alexei Starovoitov To: Peter Zijlstra Cc: Alexander Shishkin , Ingo Molnar , linux-kernel@vger.kernel.org, vince@deater.net, eranian@google.com, Arnaldo Carvalho de Melo , Jiri Olsa Subject: Re: [PATCH v2] perf: Synchronously cleanup child events Message-ID: <20160122194403.GC11338@ast-mbp.thefacebook.com> References: <20160118144410.GS6357@twins.programming.kicks-ass.net> <1453216354-9282-1-git-send-email-alexander.shishkin@linux.intel.com> <20160119200558.GC6357@twins.programming.kicks-ass.net> <87lh7hhmnn.fsf@ashishki-desk.ger.corp.intel.com> <20160122123847.GS6357@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160122123847.GS6357@twins.programming.kicks-ass.net> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 22, 2016 at 01:38:47PM +0100, Peter Zijlstra wrote: > On Fri, Jan 22, 2016 at 01:35:40PM +0200, Alexander Shishkin wrote: > > Peter Zijlstra writes: > > > > > So I think there's a number of problems still :-( I've been looking at how perf_event->owner is handled and couldn't figure out how you deal with the case of passing perf_event_fd via scm_rights. It seems one process can open an event, pass it to another process, but when current process exists owner will still point to dead task, since refcount > 0. Which part am I missing?