Re: [PATCH v2] perf: Synchronously cleanup child events

From: Alexei Starovoitov
Date: Wed Jan 27 2016 - 12:52:42 EST


On Wed, Jan 27, 2016 at 10:58:22AM +0100, Peter Zijlstra wrote:
>
> > Meaning there gotta be always a user space process
> > that will be holding perf_event FDs.
>
> By using fget() the BPF array thing will hold the FDs, right? I mean
> once you do a full fget() userspace can go and kill itself, the struct
> file will persists.

Right. I mistakenly thought that fget() will prevent the task
from freeing or some fs/directory resources will be hanging.
It's from anon_inode. So all good. All concerns cleared.