From: Peter Zijlstra <peterz@infradead.org>
To: Baptiste Lepers <baptiste.lepers@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
Mathieu Poirier <mathieu.poirier@linaro.org>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] events: Reuse value read using READ_ONCE instead of re-reading it
Date: Fri, 10 Sep 2021 18:21:07 +0200 [thread overview]
Message-ID: <20210910162107.GK4323@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <20210906015310.12802-1-baptiste.lepers@gmail.com>
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 <baptiste.lepers@gmail.com>
> Fixes: 375637bc52495 ("perf/core: Introduce address range filtering")
Thanks!
next prev parent reply other threads:[~2021-09-10 16:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-06 1:53 Baptiste Lepers
2021-09-10 16:21 ` Peter Zijlstra [this message]
2021-09-16 11:59 ` [tip: perf/urgent] " tip-bot2 for Baptiste Lepers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210910162107.GK4323@worktop.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=baptiste.lepers@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mathieu.poirier@linaro.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®