[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-04bffb83d17c1b93578564f18e02b6cb1c385b40@git.kernel.org>
Date: Fri, 1 Jul 2011 15:15:56 GMT
From: tip-bot for Vince Weaver <vweaver1@...s.utk.edu>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
a.p.zijlstra@...llo.nl, stable@...nel.org, tglx@...utronix.de,
vweaver1@...s.utk.edu, mingo@...e.hu
Subject: [tip:perf/urgent] perf_event: Return -EINVAL for Offcore Response Events
Commit-ID: 04bffb83d17c1b93578564f18e02b6cb1c385b40
Gitweb: http://git.kernel.org/tip/04bffb83d17c1b93578564f18e02b6cb1c385b40
Author: Vince Weaver <vweaver1@...s.utk.edu>
AuthorDate: Fri, 10 Jun 2011 16:07:52 -0400
Committer: Ingo Molnar <mingo@...e.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@...llo.nl>
Cc: <stable@...nel.org>
Link: http://lkml.kernel.org/r/alpine.DEB.2.00.1106101606000.14542@cl320.eecs.utk.edu
Signed-off-by: Ingo Molnar <mingo@...e.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);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists