From: Breno Leitao <leitao@debian.org>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: Oleg Nesterov <oleg@redhat.com>,
Masami Hiramatsu <mhiramat@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>,
Adrian Hunter <adrian.hunter@intel.com>,
James Clark <james.clark@linaro.org>,
Andrii Nakryiko <andrii@kernel.org>,
linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
linux-perf-users@vger.kernel.org, kernel-team@meta.com,
stable@vger.kernel.org
Subject: Re: [PATCH] uprobes: fix incorrect lockdep condition in filter_chain()
Date: Wed, 28 Jan 2026 09:51:20 -0800 [thread overview]
Message-ID: <aXpMhBIc6qBd5poV@gmail.com> (raw)
In-Reply-To: <CAEf4BzYJJiUdQTjDgr_uVSQ+uBhYWKki0vjS5VffTzbST1uS2g@mail.gmail.com>
On Wed, Jan 28, 2026 at 09:23:45AM -0800, Andrii Nakryiko wrote:
> On Wed, Jan 28, 2026 at 5:51 AM Oleg Nesterov <oleg@redhat.com> wrote:
> >
> > On 01/28, Breno Leitao wrote:
> > >
> > > The list_for_each_entry_rcu() in filter_chain() uses
> > > rcu_read_lock_trace_held() as the lockdep condition, but the function
> > > holds consumer_rwsem, not the RCU trace lock.
> > >
> > > This gives me the following output when running with some locking debug
> > > option enabled:
> > >
> > > kernel/events/uprobes.c:1141 RCU-list traversed in non-reader section!!
> > > filter_chain
> > > register_for_each_vma
> > > uprobe_unregister_nosync
> > > __probe_event_disable
> > >
> > > Remove the incorrect lockdep condition since the rwsem provides
> > > sufficient protection for the list traversal.
> >
> > I hope Andrii will recheck, but looks obviously correct to me.
>
> yeah, I did, and it also looks obviously correct to me, I didn't need
> to use rcu flavor there in the first place, I think.
>
> Acked-by: Andrii Nakryiko <andrii@kernel.org>
>
> >
> > > Fixes: 87195a1ee332a ("uprobes: switch to RCU Tasks Trace flavor for better performance")
> >
> > This commit just change the __list_check_rcu() condition...
> >
> > Perhaps
> > Fixes: cc01bd044e6a ("uprobes: travers uprobe's consumer list locklessly under SRCU protection")
> >
>
> yep, this one is the earliest change adding unnecessary rcu flavor of
> list_for_each_entry
Ack. I will respin with the correct "fixes" tag.
--breno
prev parent reply other threads:[~2026-01-28 17:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-28 9:58 [PATCH] uprobes: fix incorrect lockdep condition in filter_chain() Breno Leitao
2026-01-28 13:50 ` Oleg Nesterov
2026-01-28 17:23 ` Andrii Nakryiko
2026-01-28 17:51 ` Breno Leitao [this message]
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=aXpMhBIc6qBd5poV@gmail.com \
--to=leitao@debian.org \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=andrii.nakryiko@gmail.com \
--cc=andrii@kernel.org \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=kernel-team@meta.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mhiramat@kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=stable@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