s390/futex: Fix FUTEX_OP_ANDN implementation
authorHeiko Carstens <hca@linux.ibm.com>
Tue, 7 Jan 2025 10:28:58 +0000 (11:28 +0100)
committerAlexander Gordeev <agordeev@linux.ibm.com>
Wed, 15 Jan 2025 16:12:31 +0000 (17:12 +0100)
commit26701574cee6777f867f89b4a5c667817e1ee0dd
tree6251ea955accdeb7182716f714cccc90e747857a
parent0d30871739ab433e114b0058f08b6b1c7b816f7e
s390/futex: Fix FUTEX_OP_ANDN implementation

The futex operation FUTEX_OP_ANDN is supposed to implement

*(int *)UADDR2 &= ~OPARG;

The s390 implementation just implements an AND instead of ANDN.
Add the missing bitwise not operation to oparg to fix this.

This is broken since nearly 19 years, so it looks like user space is
not making use of this operation.

Fixes: 3363fbdd6fb4 ("[PATCH] s390: futex atomic operations")
Cc: stable@vger.kernel.org
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Acked-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
arch/s390/include/asm/futex.h