Files
kernel_google_wahoo/kernel/events
Siqi Lin c69b2a7372 ANDROID: perf/core: Validate event->oncpu in perf_event_read()
It is possible for the code in perf_event_read() to observe
event->state == PERF_EVENT_STATE_ACTIVE && event->oncpu == -1.
In this case, the percpu access in that branch will use an
invalid cpu number and cause invalid memory access. Wrap the
read of event->state and event->oncpu with READ_ONCE, then
validate the cpu number is valid. This check is done before
calling cpu_isolated() to not trigger a warning in cpumask_check().

Bug: 63928861
Change-Id: I216f6fc8c9637c0c78c9c45ec4cf6b75bfc3d01e
Signed-off-by: Siqi Lin <siqilin@google.com>
2017-07-26 00:59:51 +00:00
..
2015-11-23 09:44:58 +01:00
2016-03-23 20:58:09 -07:00