[PATCH, v5.4] perf: Correctly handle failed perf_get_aux_event()

From: Ingo Molnar
Date: Sat Jan 18 2020 - 13:05:36 EST



* Vince Weaver <vincent.weaver@xxxxxxxxx> wrote:

> On Mon, 6 Jan 2020, Vince Weaver wrote:
>
> > On Mon, 6 Jan 2020, Mark Rutland wrote:
> >
> > > On Thu, Jan 02, 2020 at 02:22:47PM -0500, Vince Weaver wrote:
> > > > On Thu, 2 Jan 2020, Vince Weaver wrote:
> > > >
> > > Vince, does the below (untested) patch work for you?
> >
> >
> > yes, this patch fixes things for me.
> >
> > Tested-by: Vince Weaver <vincent.weaver@xxxxxxxxx>
> >
>
> is this patch going to make it upstream? It's a fairly major correctness
> bug with perf_event_open().

I just sent it to Linus.

In hindsight this should have been marked Cc: stable for v5.4 - we should
forward it to Greg once Linus has pulled it:

da9ec3d3dd0f: ("perf: Correctly handle failed perf_get_aux_event()")


Note that in the v5.4 cherry-pick there's a conflict due to interaction
with another recent commit - I've attached the ported fix against v5.4,
but have only test built it.

Thanks,

Ingo

==============>