Re: [PATCH v2] panic: stop CPUs that lose the panic_redirect_cpu race
From: Bradley Morgan
Date: Tue Jul 07 2026 - 16:01:41 EST
On July 7, 2026 9:00:18 PM GMT+01:00, Andrew Morton
<akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
>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
>
>
oh absolutely great
Thanks!