Re: [PATCH] perf callchain: Fix suspicious RCU usage in get_callchain_entry()

From: Tao Chen

Date: Wed Jan 28 2026 - 03:19:35 EST


在 2026/1/28 14:26, Qing Wang 写道:
On Fri, 19 Jul 2024 at 01:41, Andrii Nakryiko <andrii.nakryiko@xxxxxxxxx> wrote:
Which is what I'm doing in [0]. Radoslaw, can you please help
validating if those changes are enough to fix this issue or we need to
do some more?

[0] https://patchwork.kernel.org/project/netdevbpf/patch/20240709204245.3=
847811-10-andrii@xxxxxxxxxx/


---
kernel/events/callchain.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)


Hi,

I found this issue still exists after your patch in upstream and I have a
patch to fix it.

Patch here: https://lore.kernel.org/all/20260128061753.1857803-1-wangqing7171@xxxxxxxxx/T/

Looking forward to your review.

--
Best regards,
Qing


Hi Qing,

I have a change that will remove RCU. As Andrii pointed out, using get_callchain_entry without RCU lock in BPF appears to be safe for now. Please point out if I've missed anything.

https://lore.kernel.org/bpf/fb745675-e25c-4dcc-be4b-4a4411056755@xxxxxxxxx/T/#mc0fc5e0fec2e6456f72f402308fd4e397ba19d09

--
Best Regards
Tao Chen