lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 17 Mar 2010 09:48:36 GMT
From:	tip-bot for Robert Richter <robert.richter@....com>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
	robert.richter@....com, ming.m.lin@...el.com, tglx@...utronix.de,
	gorcunov@...il.com, mingo@...e.hu
Subject: [tip:perf/core] perf, x86: Report error code that returned from x86_pmu.hw_config()

Commit-ID:  984763cb90d4b5444baa0c3e43feff7926bf1834
Gitweb:     http://git.kernel.org/tip/984763cb90d4b5444baa0c3e43feff7926bf1834
Author:     Robert Richter <robert.richter@....com>
AuthorDate: Tue, 16 Mar 2010 17:07:33 +0100
Committer:  Ingo Molnar <mingo@...e.hu>
CommitDate: Wed, 17 Mar 2010 10:43:50 +0100

perf, x86: Report error code that returned from x86_pmu.hw_config()

If x86_pmu.hw_config() fails a fixed error code (-EOPNOTSUPP) is
returned even if a different error was reported. This patch fixes
this.

Signed-off-by: Robert Richter <robert.richter@....com>
Acked-by: Cyrill Gorcunov <gorcunov@...il.com>
Acked-by: Lin Ming <ming.m.lin@...el.com>
Cc: acme@...hat.com
Cc: eranian@...gle.com
Cc: gorcunov@...nvz.org
Cc: peterz@...radead.org
Cc: fweisbec@...il.com
LKML-Reference: <20100316160733.GR1585@...a.amd.com>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
 arch/x86/kernel/cpu/perf_event.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index 0d3466c..5dacf63 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -472,8 +472,9 @@ static int __hw_perf_event_init(struct perf_event *event)
 	hwc->last_tag = ~0ULL;
 
 	/* Processor specifics */
-	if (x86_pmu.hw_config(attr, hwc))
-		return -EOPNOTSUPP;
+	err = x86_pmu.hw_config(attr, hwc);
+	if (err)
+		return err;
 
 	if (!hwc->sample_period) {
 		hwc->sample_period = x86_pmu.max_period;
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ