]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitcaedb6cbbf9d45f51bebf0b23ac0be6c1a5fc227
tree1311e860f1c86371852175c582d111ce565d411d
parentc36cc5d2c7c01f7f2ffef2f452f59de58a1ab3bc
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