• Mikael Pettersson's avatar
    sparc64: FUTEX_OP_ANDN fix · bb059936
    Mikael Pettersson authored
    [ Upstream commit d72609e1 ]
    
    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: default avatarMikael Pettersson <mikpe@it.uu.se>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    bb059936
futex.h 2.71 KB