diff options
| author | Baptiste Lepers <[email protected]> | 2021-09-06 01:53:10 +0000 |
|---|---|---|
| committer | Peter Zijlstra <[email protected]> | 2021-09-15 15:49:06 +0000 |
| commit | b89a05b21f46150ac10a962aa50109250b56b03b (patch) | |
| tree | e4a85375c8fbeef5edd0fc1fba90d47bc23835df /arch/powerpc/lib/code-patching.c | |
| parent | Linux 5.15-rc1 (diff) | |
| download | kernel-b89a05b21f46150ac10a962aa50109250b56b03b.tar.gz kernel-b89a05b21f46150ac10a962aa50109250b56b03b.zip | |
events: Reuse value read using READ_ONCE instead of re-reading it
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: 375637bc52495 ("perf/core: Introduce address range filtering")
Signed-off-by: Baptiste Lepers <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'arch/powerpc/lib/code-patching.c')
0 files changed, 0 insertions, 0 deletions
