]> git.itanic.dy.fi Git - linux-stable/commit
MIPS: Fix mips_atomic_set() retry condition
authorJames Hogan <james.hogan@imgtec.com>
Wed, 31 May 2017 15:19:47 +0000 (16:19 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Wed, 28 Jun 2017 10:22:40 +0000 (12:22 +0200)
commit2ec420b26f7b6ff332393f0bb5a7d245f7ad87f0
tree8797adffee061faaf6f9b9d5f1e6985b22d06003
parent736add2412a7740d9d8b56fb83440e94b01bc1b4
MIPS: Fix mips_atomic_set() retry condition

The inline asm retry check in the MIPS_ATOMIC_SET operation of the
sysmips system call has been backwards since commit f1e39a4a616c ("MIPS:
Rewrite sysmips(MIPS_ATOMIC_SET, ...) in C with inline assembler")
merged in v2.6.32, resulting in the non R10000_LLSC_WAR case retrying
until the operation was inatomic, before returning the new value that
was probably just written multiple times instead of the old value.

Invert the branch condition to fix that particular issue.

Fixes: f1e39a4a616c ("MIPS: Rewrite sysmips(MIPS_ATOMIC_SET, ...) in C with inline assembler")
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: stable@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/16148/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/syscall.c