Files
twx-linux/kernel
Baptiste Lepers af7eb47843 events: Reuse value read using READ_ONCE instead of re-reading it
commit b89a05b21f upstream.

In perf_event_addr_filters_apply, the task associated with
the event (event->ctx->task) is read using READ_ONCE at the beginning
of the function, checked, and then re-read from event->ctx->task,
voiding all guarantees of the checks. Reuse the value that was read by
READ_ONCE to ensure the consistency of the task struct throughout the
function.

Fixes: 375637bc52 ("perf/core: Introduce address range filtering")
Signed-off-by: Baptiste Lepers <baptiste.lepers@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20210906015310.12802-1-baptiste.lepers@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-09-22 11:43:09 +02:00
..
2020-09-23 08:46:14 +02:00
2019-11-28 18:28:55 +01:00
2021-06-16 11:36:34 +02:00
…
…
…
…
…
…
…
2018-08-03 07:55:12 +02:00
…
…
2021-02-10 09:09:25 +01:00
2020-04-02 17:20:26 +02:00
…
…
…
…
2020-04-24 07:58:54 +02:00
…
…
2018-08-03 07:55:24 +02:00
…
2020-01-12 11:24:12 +01:00
…
…
…
…
…
…