From: Oleg Nesterov <oleg@redhat.com>
To: Andrii Nakryiko <andrii@kernel.org>
Cc: linux-trace-kernel@vger.kernel.org, peterz@infradead.org,
mingo@kernel.org, bpf@vger.kernel.org,
linux-kernel@vger.kernel.org, jolsa@kernel.org,
kernel-team@meta.com, Breno Leitao <leitao@debian.org>
Subject: Re: [PATCH perf/core] uprobes: remove too strict lockdep_assert() condition in hprobe_expire()
Date: Wed, 26 Feb 2025 12:30:09 +0100 [thread overview]
Message-ID: <20250226113008.GA8995@redhat.com> (raw)
In-Reply-To: <20250225223214.2970740-1-andrii@kernel.org>
On 02/25, Andrii Nakryiko wrote:
>
> --- a/kernel/events/uprobes.c
> +++ b/kernel/events/uprobes.c
> @@ -762,10 +762,14 @@ static struct uprobe *hprobe_expire(struct hprobe *hprobe, bool get)
> enum hprobe_state hstate;
>
> /*
> - * return_instance's hprobe is protected by RCU.
> - * Underlying uprobe is itself protected from reuse by SRCU.
> + * Caller should guarantee that return_instance is not going to be
> + * freed from under us. This can be achieved either through holding
> + * rcu_read_lock() or by owning return_instance in the first place.
> + *
> + * Underlying uprobe is itself protected from reuse by SRCU, so ensure
> + * SRCU lock is held properly.
> */
> - lockdep_assert(rcu_read_lock_held() && srcu_read_lock_held(&uretprobes_srcu));
> + lockdep_assert(srcu_read_lock_held(&uretprobes_srcu));
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
prev parent reply other threads:[~2025-02-26 11:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-25 22:32 [PATCH perf/core] uprobes: remove too strict lockdep_assert() condition in hprobe_expire() Andrii Nakryiko
2025-02-25 22:41 ` [tip: perf/urgent] uprobes: Remove " tip-bot2 for Andrii Nakryiko
2025-02-26 10:41 ` [PATCH perf/core] uprobes: remove " Jiri Olsa
2025-02-26 11:30 ` Oleg Nesterov [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=20250226113008.GA8995@redhat.com \
--to=oleg@redhat.com \
--cc=andrii@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=jolsa@kernel.org \
--cc=kernel-team@meta.com \
--cc=leitao@debian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.