[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id:
<173947144300.1330575.4364486946556377842.git-patchwork-notify@kernel.org>
Date: Thu, 13 Feb 2025 18:30:43 +0000
From: patchwork-bot+linux-riscv@...nel.org
To: Andreas Schwab <schwab@...e.de>
Cc: linux-riscv@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] riscv/atomic: Do proper sign extension also for unsigned in
arch_cmpxchg
Hello:
This patch was applied to riscv/linux.git (fixes)
by Palmer Dabbelt <palmer@...osinc.com>:
On Thu, 30 Jan 2025 10:25:38 +0100 you wrote:
> Sign extend also an unsigned compare value to match what lr.w is doing.
> Otherwise try_cmpxchg may spuriously return true when used on a u32 value
> that has the sign bit set, as it happens often in inode_set_ctime_current.
>
> Do this in three conversion steps. The first conversion to long is needed
> to avoid a -Wpointer-to-int-cast warning when arch_cmpxchg is used with a
> pointer type. Then convert to int and back to long to always sign extend
> the 32-bit value to 64-bit.
>
> [...]
Here is the summary with links:
- riscv/atomic: Do proper sign extension also for unsigned in arch_cmpxchg
https://git.kernel.org/riscv/c/431a3bbd3249
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Powered by blists - more mailing lists