linux/arch/x86/events/intel
Alexander Shishkin 2eece390bf perf/x86/intel/bts: Fix exclusive event reference leak
Commit:

  d2878d642a ("perf/x86/intel/bts: Disallow use by unprivileged users on paranoid systems")

... adds a privilege check in the exactly wrong place in the event init path:
after the 'LBR exclusive' reference has been taken, and doesn't release it
in the case of insufficient privileges. After this, nobody in the system
gets to use PT or LBR afterwards.

This patch moves the privilege check to where it should have been in the
first place.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: d2878d642a ("perf/x86/intel/bts: Disallow use by unprivileged users on paranoid systems")
Link: http://lkml.kernel.org/r/20171023123533.16973-1-alexander.shishkin@linux.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-10-24 13:19:27 +02:00
..
bts.c perf/x86/intel/bts: Fix exclusive event reference leak 2017-10-24 13:19:27 +02:00
core.c perf/x86/intel, watchdog/core: Sanitize PMU HT bug workaround 2017-09-14 11:41:03 +02:00
cstate.c perf/x86/intel/cstate: Add missing CPU IDs 2017-09-25 09:36:17 +02:00
ds.c perf/core, x86: Add PERF_SAMPLE_PHYS_ADDR 2017-08-29 15:09:25 +02:00
knc.c
lbr.c Merge branch 'perf/urgent' into perf/core, to pick up latest fixes and refresh the tree 2017-07-30 11:15:13 +02:00
Makefile x86/perf/cqm: Wipe out perf based cqm 2017-08-01 22:41:18 +02:00
p4.c x86: Mark various structures and functions as 'static' 2017-08-11 14:49:43 +02:00
p6.c
pt.c perf/core, pt, bts: Get rid of itrace_started 2017-08-29 15:09:24 +02:00
pt.h perf/x86/intel/pt: Allow the disabling of branch tracing 2017-03-30 09:53:49 +02:00
rapl.c perf/x86/intel/rapl: Add missing CPU IDs 2017-09-25 09:36:17 +02:00
uncore_nhmex.c x86: Constify attribute_group structures 2017-08-18 11:30:35 +02:00
uncore_snb.c x86: Constify attribute_group structures 2017-08-18 11:30:35 +02:00
uncore_snbep.c perf/x86/intel/uncore: Correct num_boxes for IIO and IRP 2017-09-25 12:43:56 +02:00
uncore.c perf/x86/intel/uncore: Fix memory leaks on allocation failures 2017-10-10 12:51:07 +02:00
uncore.h x86/events: Remove last remnants of old filenames 2017-03-01 11:27:26 +01:00