asm-generic: Fix 32 bit __generic_cmpxchg_local
authorDavid McKay <david.mckay@codasip.com>
Thu, 4 Jan 2024 09:40:10 +0000 (09:40 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jan 2024 23:35:19 +0000 (15:35 -0800)
commit6e007fac81cf9cb45f14305bf8030dfaf037a29c
tree16d501659d76f614b228cede4e1f42f3ea9a4ce0
parent75aa038d9f6ea47a10dda28a6c9fb864fccfab60
asm-generic: Fix 32 bit __generic_cmpxchg_local

[ Upstream commit d93cca2f3109f88c94a32d3322ec8b2854a9c339 ]

Commit 656e9007ef58 ("asm-generic: avoid __generic_cmpxchg_local
warnings") introduced a typo that means the code is incorrect for 32 bit
values. It will work fine for postive numbers, but will fail for
negative numbers on a system where longs are 64 bit.

Fixes: 656e9007ef58 ("asm-generic: avoid __generic_cmpxchg_local warnings")
Signed-off-by: David McKay <david.mckay@codasip.com>
Signed-off-by: Stuart Menefy <stuart.menefy@codasip.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/asm-generic/cmpxchg-local.h