Thread (2 messages) flat view 2 messages, 2 authors, 2021-09-10

Re: [PATCH] events: Reuse value read using READ_ONCE instead of re-reading it

From: Peter Zijlstra <peterz@infradead.org>
Date: 2021-09-10 16:21:21
Also in: lkml

On Mon, Sep 06, 2021 at 11:53:10AM +1000, Baptiste Lepers wrote:
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.

Signed-off-by: Baptiste Lepers <redacted>
Fixes: 375637bc52495 ("perf/core: Introduce address range filtering")
Thanks!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help