mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Vince Weaver <vweaver1@eecs.utk.edu>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	a.p.zijlstra@chello.nl, stable@kernel.org, tglx@linutronix.de,
	vweaver1@eecs.utk.edu, mingo@elte.hu
Subject: [tip:perf/urgent] perf_event: Return -EINVAL for Offcore Response Events
Date: Fri, 1 Jul 2011 15:15:56 GMT	[thread overview]
Message-ID: <tip-04bffb83d17c1b93578564f18e02b6cb1c385b40@git.kernel.org> (raw)
In-Reply-To: <alpine.DEB.2.00.1106101606000.14542@cl320.eecs.utk.edu>

Commit-ID:  04bffb83d17c1b93578564f18e02b6cb1c385b40
Gitweb:     http://git.kernel.org/tip/04bffb83d17c1b93578564f18e02b6cb1c385b40
Author:     Vince Weaver <vweaver1@eecs.utk.edu>
AuthorDate: Fri, 10 Jun 2011 16:07:52 -0400
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Fri, 1 Jul 2011 10:27:09 +0200

perf_event: Return -EINVAL for Offcore Response Events

Return a proper error code when denying raw access to Offcore Response
events. Right now we return "0" which gives tools the false impression
that opening the event worked.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: <stable@kernel.org>
Link: http://lkml.kernel.org/r/alpine.DEB.2.00.1106101606000.14542@cl320.eecs.utk.edu
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/kernel/cpu/perf_event.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index 3a0338b..c6bfa6b 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -598,7 +598,7 @@ static int x86_setup_perfctr(struct perf_event *event)
 	 * there's no sane user-space generalization yet:
 	 */
 	if (attr->type == PERF_TYPE_RAW)
-		return 0;
+		return -EINVAL;
 
 	if (attr->type == PERF_TYPE_HW_CACHE)
 		return set_ext_hw_attr(hwc, event);

  reply	other threads:[~2011-07-01 15:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-10 20:07 [patch] " Vince Weaver
2011-07-01 15:15 ` tip-bot for Vince Weaver [this message]
2011-07-01 15:42   ` [tip:perf/urgent] " Vince Weaver

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=tip-04bffb83d17c1b93578564f18e02b6cb1c385b40@git.kernel.org \
    --to=vweaver1@eecs.utk.edu \
    --cc=a.p.zijlstra@chello.nl \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=stable@kernel.org \
    --cc=tglx@linutronix.de \
    /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®