From: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
To: peterz@infradead.org, --@madhuparna-HP-Notebook,
mingo@redhat.com, -c@madhuparna-HP-Notebook, jolsa@redhat.com,
linux-kernel@vger.kernel.org, joel@joelfernandes.org,
rcu@vger.kernel.org,
linux-kernel-mentees@lists.linuxfoundation.org,
frextrite@gmail.com
Subject: [PATCH] events:core.c: Use built-in RCU list checking
Date: Sat, 18 Jan 2020 08:36:18 +0530 [thread overview]
Message-ID: <20200118030618.GA28502@madhuparna-HP-Notebook> (raw)
list_for_each_entry_rcu has built-in RCU and lock checking.
Pass cond argument to list_for_each_entry_rcu() to silence
false lockdep warning when CONFIG_PROVE_RCU_LIST is enabled
by default.
Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
---
kernel/events/core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 4ff86d57f9e5..04d28f3eb8df 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -3760,7 +3760,8 @@ static void perf_adjust_freq_unthr_context(struct perf_event_context *ctx,
raw_spin_lock(&ctx->lock);
perf_pmu_disable(ctx->pmu);
- list_for_each_entry_rcu(event, &ctx->event_list, event_entry) {
+ list_for_each_entry_rcu(event, &ctx->event_list, event_entry,
+ lockdep_is_held(&ctx->lock)) {
if (event->state != PERF_EVENT_STATE_ACTIVE)
continue;
--
2.17.1
reply other threads:[~2020-01-18 3:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20200118030618.GA28502@madhuparna-HP-Notebook \
--to=madhuparnabhowmik10@gmail.com \
--cc=--@madhuparna-HP-Notebook \
--cc=-c@madhuparna-HP-Notebook \
--cc=frextrite@gmail.com \
--cc=joel@joelfernandes.org \
--cc=jolsa@redhat.com \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rcu@vger.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;
as well as URLs for NNTP newsgroup(s).