Re: [PATCH] atomic: Put the fetching of the old value into the loop when doing atomic CAS

From: Peter Zijlstra
Date: Thu Feb 24 2022 - 07:03:04 EST


On Thu, Feb 24, 2022 at 04:24:38PM +0800, Junru Shen wrote:
> Put the acquisition of the expected value inside the loop to prevent an infinite loop when it does not match.

NAK, this is broken.