Re: [PATCH v2] ARM: asid: Do not replace active_asids if already 0

From: Karl Mehltretter

Date: Wed Aug 26 2026 - 23:57:02 EST


On Sun, Aug 09, 2026 at 08:06:00PM +0100, Karl Mehltretter wrote:
> This patch changes the xchg to cmpxchg so that the active_asids is only
> updated if non-zero to avoid a race with an ASID roll-over on a
> different CPU.
>
> Cc: Russell King <linux@xxxxxxxxxxxxxxx>
> Cc: Will Deacon <will@xxxxxxxxxx>
> Signed-off-by: Catalin Marinas <catalin.marinas@xxxxxxx>
> Tested-by: Karl Mehltretter <kmehltretter@xxxxxxxxx>
> Signed-off-by: Karl Mehltretter <kmehltretter@xxxxxxxxx>
> ---
> This is similar to the arm64 patch [1], with the difference that
> non-relaxed (cmp)xchg is used as in the existing ARM code.
>
> This is a resubmission of Catalin Marinas' original 2018 patch. The
> original submission was not merged, and the ARM32 equivalent of the arm64
> ASID rollover fix remains missing.
>

Just a friendly ping in case this got missed.

Thanks,
Karl