Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dadc47f8 authored by Baptiste Lepers's avatar Baptiste Lepers Committed by Gerrit - the friendly Code Review server
Browse files

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: 375637bc ("perf/core: Introduce address range filtering")
Change-Id: Ia4f6161cfc2c95073aeaff85936efa737508c5a2
Signed-off-by: default avatarBaptiste Lepers <baptiste.lepers@xxxxxxxxx>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
Link: https://lkml.kernel.org/r/20210906015310.12802-1-baptiste.lepers@xxxxxxxxx


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: default avatarBaptiste Lepers <baptiste.lepers@xxxxxxxxx>
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git


Git-commit: b89a05b21f46150ac10a962aa50109250b56b03b
Signed-off-by: default avatarKishor Krishna Bhat <kishkris@codeaurora.org>
parent 8aafd51f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment