Re: [PATCH v2 10/11] perf/uprobe: Convert single-step and uretprobe to SRCU

From: Oleg Nesterov
Date: Fri Jul 12 2024 - 06:28:24 EST


On 07/11, Peter Zijlstra wrote:
>
> uprobe_free_stage1
> call_srcu(&uretprobe_srcu, &uprobe->rcu, uprobe_free_stage2);
>
> put_uprobe()
> if (refcount_dec_and_test)
> call_srcu(&uprobes_srcu, &uprobe->rcu, uprobe_free_stage1);
>
>
> So my thinking was since we take uretprobe_srcu *inside* uprobe_srcu,

Ah, indeed! Somehow misread the change in put_uprobe() as if it
uses call_rcu(uretprobe_srcu).

Thanks,

Oleg.