ARM: 7099/1: futex: preserve oldval in SMP __futex_atomic_op
authorWill Deacon <will.deacon@arm.com>
Fri, 23 Sep 2011 13:34:12 +0000 (14:34 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 26 Sep 2011 11:36:47 +0000 (12:36 +0100)
commitdf77abcafc8dc881b6c9347548651777088e4b27
tree1311e860f1c86371852175c582d111ce565d411d
parentd8e89b47e00ee80e920761145144640aac4cf71a
ARM: 7099/1: futex: preserve oldval in SMP __futex_atomic_op

The SMP implementation of __futex_atomic_op clobbers oldval with the
status flag from the exclusive store. This causes it to always read as
zero when performing the FUTEX_OP_CMP_* operation.

This patch updates the ARM __futex_atomic_op implementations to take a
tmp argument, allowing us to store the strex status flag without
overwriting the register containing oldval.

Cc: stable@kernel.org
Reported-by: Minho Ban <mhban@samsung.com>
Reviewed-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/include/asm/futex.h