diff options
author | Peter Zijlstra <peterz@infradead.org> | 2017-08-01 16:09:55 -0700 |
---|---|---|
committer | Patrick Fay <pfay@codeaurora.org> | 2017-08-02 11:10:44 -0700 |
commit | 2e54dcd5ed1784bc30fb6b956ed77b7f668acb1f (patch) | |
tree | 835155ea8752afaa124f45bde360d175e132b73b /drivers/misc/altera-stapl/Makefile | |
parent | 9f462e8a2b950650297e36fb77171ac5a7a433a2 (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.
Author: Peter Zijlstra (Intel) <peterz@infradead.org>
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")
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Git-commit: 451d24d1e5f40bad000fa9abe36ddb16fc9928cb
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[pfay@codeaurora.org: apply the event->oncpu validity check from
from the patch. Other code from the patch calls routines
not yet in 4.4 so omit that part of patch. This code fixes
segfault crashes during reboot where the event->oncpu value is -1.
Change-Id: I040f0af2030e53ac3329e4b3a1bbcd37f080cdcf
Signed-off-by: Patrick Fay <pfay@codeaurora.org>
Diffstat (limited to 'drivers/misc/altera-stapl/Makefile')
0 files changed, 0 insertions, 0 deletions