* [PATCH] perf/bts: Don't try handling BTS interrupt if BTS is not enabled
@ 2016-09-26 19:19 Boris Ostrovsky
2016-09-26 21:05 ` Alexander Shishkin
0 siblings, 1 reply; 2+ messages in thread
From: Boris Ostrovsky @ 2016-09-26 19:19 UTC (permalink / raw)
To: tglx, mingo, hpa, x86
Cc: alexander.shishkin, peterz, bp, linux-kernel, boris.ostrovsky
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] perf/bts: Don't try handling BTS interrupt if BTS is not enabled
2016-09-26 19:19 [PATCH] perf/bts: Don't try handling BTS interrupt if BTS is not enabled Boris Ostrovsky
@ 2016-09-26 21:05 ` Alexander Shishkin
0 siblings, 0 replies; 2+ messages in thread
From: Alexander Shishkin @ 2016-09-26 21:05 UTC (permalink / raw)
To: Boris Ostrovsky
Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86,
Alexander Shishkin, Peter Zijlstra, bp,
Linux Kernel Mailing List
http://git.kernel.org/cgit/linux/kernel/git/tip/tip.git/commit/?id=f1e1c9e5e357c05253affb13be29285c5cb56bf0
On 26 September 2016 at 22:19, Boris Ostrovsky
<boris.ostrovsky@oracle.com> wrote:
> 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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-26 21:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-26 19:19 [PATCH] perf/bts: Don't try handling BTS interrupt if BTS is not enabled Boris Ostrovsky
2016-09-26 21:05 ` Alexander Shishkin
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®