[PATCH v2] ARM v6/v7 cmpxchg64 shouldn't clear upper 32 bits of the old/new value
Will Deacon
will.deacon at arm.com
Wed May 8 12:55:00 EDT 2013
On Wed, May 08, 2013 at 04:06:54PM +0100, Jaccon Bastiaansen wrote:
> The implementation of cmpxchg64() for the ARM v6 and v7 architecture
> casts parameter 2 and 3 (the old and new 64bit values) to an unsigned
> long before calling the atomic_cmpxchg64() function. This clears
> the top 32 bits of the old and new values, resulting in the wrong
> values being compare-exchanged.
>
> This bug is introduced by commit 3e0f5a15f500 (ARM: 7404/1: cmpxchg64: use atomic64
Best to line-wrap this at 76 chars.
> and local64 routines for cmpxchg64)
>
> Signed-off-by: Jaccon Bastiaansen <jaccon.bastiaansen at gmail.com>
Please add the following above your S-o-B:
Cc: <stable at vger.kernel.org>
Acked-by: Will Deacon <will.deacon at arm.com>
Then below your S-o-B, add:
KernelVersion: 3.9
and send the patch to patches at arm.linux.org.uk
Cheers,
Will
More information about the linux-arm-kernel
mailing list