summaryrefslogtreecommitdiff
path: root/drivers/base/firmware_class.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2017-01-31 11:27:10 +0100
committerIngo Molnar <mingo@kernel.org>2017-02-10 09:04:50 +0100
commit451d24d1e5f40bad000fa9abe36ddb16fc9928cb (patch)
tree532b1fe208f3223a3b447f535f4a761f08c2527a /drivers/base/firmware_class.c
parent53e74a112ce5c1c9b6a6923bdd6612133625d579 (diff)
perf/core: Fix crash in perf_event_read()
Alexei had his box explode because doing read() on a package (rapl/uncore) event that isn't currently scheduled in ends up doing an out-of-bounds load. Rework the code to more explicitly deal with event->oncpu being -1. Reported-by: Alexei Starovoitov <alexei.starovoitov@gmail.com> Tested-by: Alexei Starovoitov <ast@kernel.org> Tested-by: David Carrillo-Cisneros <davidcc@google.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: eranian@google.com Fixes: d6a2f9035bfc ("perf/core: Introduce PMU_EV_CAP_READ_ACTIVE_PKG") Link: http://lkml.kernel.org/r/20170131102710.GL6515@twins.programming.kicks-ass.net Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/base/firmware_class.c')
0 files changed, 0 insertions, 0 deletions