]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
s390/futex: Fix FUTEX_OP_ANDN implementation
authorHeiko Carstens <hca@linux.ibm.com>
Tue, 7 Jan 2025 10:28:58 +0000 (11:28 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Feb 2025 12:49:38 +0000 (13:49 +0100)
commit2eb70a0b5bd3cb50f6e97da4e23d825d88bf73f6
tree86b7d8a7f5bea0b03c5d38bef93f8278e890695f
parent7879a3e54cc4d31d4defb6d974ae3127d991c8ac
s390/futex: Fix FUTEX_OP_ANDN implementation

commit 26701574cee6777f867f89b4a5c667817e1ee0dd upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/s390/include/asm/futex.h