Re: [PATCH v2] panic: stop CPUs that lose the panic_redirect_cpu race
From: Andrew Morton
Date: Tue Jul 07 2026 - 16:00:22 EST
On Tue, 7 Jul 2026 18:32:53 +0000 Bradley Morgan <include@xxxxxxxxx> wrote:
> Loser of the redirect cmpxchg must stop, not fall through to
> panic_try_start().
>
> This issue was found by sashiko [1].
>
Thanks, I'll queue for test-n-review.
>
> Changes since v1: a nested panic on the CPU that already holds
> panic_redirect_cpu would fail its own cmpxchg and, with v1's
> unconditional return true, halt itself and abandon the panic.
> Check old_cpu == this_cpu so the winner of a nested reentry
> falls through to panic_try_start() instead.
Sashiko ain't done yet:
https://sashiko.dev/#/patchset/20260707183253.9793-1-include@xxxxxxxxx