[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZhRI7WfjgkCTK9aK@pavilion.home>
Date: Mon, 8 Apr 2024 21:43:41 +0200
From: Frederic Weisbecker <frederic@...nel.org>
To: Ian Rogers <irogers@...gle.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>,
Adrian Hunter <adrian.hunter@...el.com>
Subject: Re: [PATCH 0/4] perf: Fix leaked events when sigtrap = 1
Le Fri, Mar 29, 2024 at 08:23:49PM -0700, Ian Rogers a écrit :
> On Fri, Mar 29, 2024 at 4:58 PM Frederic Weisbecker <frederic@...nel.org> wrote:
> >
> > While looking at task_work users I just noticed that perf doesn't flush
> > its own upon event exiting. This looks especially problematic with child
> > events. Please have a thourough look at the last patch, I may easily
> > have missed something within the maze.
> >
> > Frederic Weisbecker (4):
> > task_work: s/task_work_cancel()/task_work_cancel_func()/
> > task_work: Introduce task_work_cancel() again
> > perf: Fix event leak upon exit
> > perf: Fix event leak upon exec and file release
> >
> > include/linux/perf_event.h | 1 +
> > include/linux/task_work.h | 3 ++-
> > kernel/events/core.c | 40 +++++++++++++++++++++++++++++++-------
> > kernel/irq/manage.c | 2 +-
> > kernel/task_work.c | 34 +++++++++++++++++++++++++++-----
> > security/keys/keyctl.c | 2 +-
> > 6 files changed, 67 insertions(+), 15 deletions(-)
>
> Thanks for this! I wonder if this relates to fuzzing failures like:
> https://lore.kernel.org/linux-perf-users/CAP-5=fUa+-Tj2b_hxk96Qg5=Qu7jYHgHREbsmBa2ZmuF-X9QaA@mail.gmail.com/
> "[ 2519.138665] unexpected event refcount: 2; ptr=000000009c56b097"
Probably not since those seem to happen on perf_event_open() failures. This
looks different.
Thanks.
>
> Thanks,
> Ian
>
> > --
> > 2.44.0
> >
Powered by blists - more mailing lists