From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org
Cc: alexander.shishkin@linux.intel.com, peterz@infradead.org,
bp@suse.de, linux-kernel@vger.kernel.org,
boris.ostrovsky@oracle.com
Subject: [PATCH] perf/bts: Don't try handling BTS interrupt if BTS is not enabled
Date: Mon, 26 Sep 2016 15:19:06 -0400 [thread overview]
Message-ID: <1474917546-13772-1-git-send-email-boris.ostrovsky@oracle.com> (raw)
Otherwise we will try to dereference ds which has not been allocated.
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
---
arch/x86/events/intel/bts.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/x86/events/intel/bts.c b/arch/x86/events/intel/bts.c
index bdcd651..1f5657f 100644
--- a/arch/x86/events/intel/bts.c
+++ b/arch/x86/events/intel/bts.c
@@ -451,6 +451,9 @@ int intel_bts_interrupt(void)
s64 old_head;
int err = -ENOSPC, handled = 0;
+ if (!x86_pmu.bts)
+ return 0;
+
/*
* The only surefire way of knowing if this NMI is ours is by checking
* the write ptr against the PMI threshold.
--
1.8.3.1
next reply other threads:[~2016-09-26 19:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-26 19:19 Boris Ostrovsky [this message]
2016-09-26 21:05 ` Alexander Shishkin
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=1474917546-13772-1-git-send-email-boris.ostrovsky@oracle.com \
--to=boris.ostrovsky@oracle.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=bp@suse.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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
all inboxes | Powered by JetHome®