]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
sparc64: FUTEX_OP_ANDN fix
authorMikael Pettersson <mikpe@it.uu.se>
Wed, 30 Jul 2008 22:40:50 +0000 (15:40 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 20 Aug 2008 18:05:05 +0000 (11:05 -0700)
commitbb059936d620e34e69b72a667ad23a84432a7b85
tree93f2b96e8bd88ee26a365fa60e296939a496c02d
parentbf408b4303a36e6f70514249b71fbec3a84678b8
sparc64: FUTEX_OP_ANDN fix

[ Upstream commit d72609e17fd93bb2f7e0f7e1bdc70b6d20e43843 ]

Correct sparc64's implementation of FUTEX_OP_ANDN to do a
bitwise negate of the oparg parameter before applying the
AND operation. All other archs that support FUTEX_OP_ANDN
either negate oparg explicitly (frv, ia64, mips, sh, x86),
or do so indirectly by using an and-not instruction (powerpc).
Since sparc64 has and-not, I chose to use that solution.

I've not found any use of FUTEX_OP_ANDN in glibc so the
impact of this bug is probably minor. But other user-space
components may try to use it so it should still get fixed.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
include/asm-sparc64/futex.h