From: Borislav Petkov <bp@alien8.de>
To: David Carrillo-Cisneros <davidcc@google.com>
Cc: linux-kernel@vger.kernel.org, "x86@kernel.org" <x86@kernel.org>,
Ingo Molnar <mingo@redhat.com>,
"Yan, Zheng" <zheng.z.yan@intel.com>,
Andi Kleen <ak@linux.intel.com>, Kan Liang <kan.liang@intel.com>,
Peter Zijlstra <peterz@infradead.org>,
Stephane Eranian <eranian@google.com>
Subject: Re: [PATCH] perf/core: make account/unaccount_sb_event consistent
Date: Tue, 7 Jun 2016 11:15:46 +0200 [thread overview]
Message-ID: <20160607091546.GB1170@pd.tnic> (raw)
In-Reply-To: <1464809585-66072-1-git-send-email-davidcc@google.com>
On Wed, Jun 01, 2016 at 12:33:05PM -0700, David Carrillo-Cisneros wrote:
> unaccount_pmu_sb_event did not check for attributes in event->attr
> before calling detach_sb_event, while account_pmu_event did.
>
> This caused NULL pointer reference in cgroup events that did not
> have any of the attributes checked by account_pmu_event.
>
> To trigger the bug just wait for a cgroup event to terminate, e.g.:
>
> $ mkdir /dev/cgroup/devices/test
> $ perf stat -e cycles -a -G test sleep 0
>
> ... see crash ...
>
> Patch rebased on peterz/queue/perf/core .
>
> Reviewed-by: Stephane Eranian <eranian@google.com>
> Signed-off-by: David Carrillo-Cisneros <davidcc@google.com>
> ---
> kernel/events/core.c | 34 ++++++++++++++++++----------------
> 1 file changed, 18 insertions(+), 16 deletions(-)
Tested-by: Borislav Petkov <bp@suse.de>
--
Regards/Gruss,
Boris.
ECO tip #101: Trim your mails when you reply.
next prev parent reply other threads:[~2016-06-07 9:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-01 19:33 [PATCH] perf/core: make account/unaccount_sb_event consistent David Carrillo-Cisneros
2016-06-07 9:15 ` Borislav Petkov [this message]
2016-06-08 8:52 ` [tip:perf/core] perf/core: Fix crash due to account/unaccount_sb_event() inconsistency tip-bot for David Carrillo-Cisneros
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160607091546.GB1170@pd.tnic \
--to=bp@alien8.de \
--cc=ak@linux.intel.com \
--cc=davidcc@google.com \
--cc=eranian@google.com \
--cc=kan.liang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=x86@kernel.org \
--cc=zheng.z.yan@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).