Re: [PATCH 1/8] mm: introduce for_each_process_rcu and for_each_thread_rcu
From: Steven Rostedt
Date: Fri Sep 11 2026 - 09:02:36 EST
On Tue, 8 Sep 2026 10:38:17 +0200
Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
> Right, so GCC will accept and miscompile jumps into a scope. Clang will
> warn/error about this, so this should never happen.
>
> Aside from the ASM GOTO issue, there is also an issue with computed
> goto, those don't work either.
So should we have Sashiko stop complaining about it?
[Severity: Low]
Does this mix scope-based cleanup with manual goto-based error handling?
By replacing the manual RCU lock with for_each_process_thread_rculock()
(which uses scoped_guard(rcu)), the function now relies on scope-based
cleanup for the RCU lock, but still jumps to a manual "goto free" label
for the memory cleanup below.
The cleanup guidelines state that for a given routine, we should convert all
resources that need a "goto" cleanup to scope-based cleanup, or convert none
of them, avoiding mixed usage in the same function.
https://lore.kernel.org/linux-trace-kernel/20260911081013.E1ACF1F000FF@xxxxxxxxxxxxxxx/
-- Steve