From: Peter Zijlstra <peterz@infradead.org>
To: Jiri Olsa <jolsa@kernel.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Yanqiu Zhang <yanqzhan@redhat.com>,
Tony Luck <tony.luck@intel.com>,
Vikas Shivappa <vikas.shivappa@linux.intel.com>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] perf/x86/intel/cqm: Check cqm/mbm enabled state in event init
Date: Tue, 6 Sep 2016 10:13:23 +0200 [thread overview]
Message-ID: <20160906081323.GE10153@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1473089407-21857-1-git-send-email-jolsa@kernel.org>
On Mon, Sep 05, 2016 at 05:30:07PM +0200, Jiri Olsa wrote:
> Yanqiu Zhang reported kernel panic when using mbm event
> on system where CQM is detected but without mbm event
> support, like with perf:
>
> # perf stat -e 'intel_cqm/event=3/' -a
>
> BUG: unable to handle kernel NULL pointer dereference at 0000000000000020
> IP: [<ffffffff8100d64c>] update_sample+0xbc/0xe0
> ...
> <IRQ>
> [<ffffffff8100d688>] __intel_mbm_event_init+0x18/0x20
> [<ffffffff81113d6b>] flush_smp_call_function_queue+0x7b/0x160
> [<ffffffff81114853>] generic_smp_call_function_single_interrupt+0x13/0x60
> [<ffffffff81052017>] smp_call_function_interrupt+0x27/0x40
> [<ffffffff816fb06c>] call_function_interrupt+0x8c/0xa0
> ...
>
> The reason is that we currently allow to init mbm event
> even if mbm support is not detected. Adding checks for
> both cqm and mbm events and support into cqm's event_init.
>
> Reported-by: Yanqiu Zhang <yanqzhan@redhat.com>
> Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Fixes: 33c3cc7acfd9 ("perf/x86/mbm: Add Intel Memory B/W Monitoring enumeration and init")
Cc: stable@vger.kernelo.org # 4.6+
next prev parent reply other threads:[~2016-09-06 8:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-05 15:30 [PATCH] perf/x86/intel/cqm: Check cqm/mbm enabled state in event init Jiri Olsa
2016-09-06 8:13 ` Peter Zijlstra [this message]
2016-09-06 8:46 ` [tip:perf/urgent] " tip-bot for Jiri Olsa
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=20160906081323.GE10153@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=vikas.shivappa@linux.intel.com \
--cc=yanqzhan@redhat.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