Re: perf: bug in rdpmc/mmap accounting after exec

From: Vince Weaver
Date: Thu Aug 03 2017 - 14:04:26 EST


On Wed, 2 Aug 2017, Peter Zijlstra wrote:

> On Wed, Jul 26, 2017 at 03:39:01PM -0400, Vince Weaver wrote:
> > In fact, current->mm->context.perf_rdpmc_allowed goes negative which seems
> > like it shouldn't happen?

>
> Good find that...
>
> The below seems to fix that for me.

yes, I can confirm that with this patch all of the various PAPI and
perf_event_tests pass on my test system.

Thanks,

Vince