]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Fri, 11 Aug 2017 10:37:45 +0000 (12:37 +0200)
commitc83892ce10e39c487c79640530c182630cefa518
treeaeb05b3cf113e11d6be1d40df3b5f7c84f01b99c
parentd75345033978df136477c796d8e0aeab6fd42a3a
MIPS: Fix mips_atomic_set() retry condition

BugLink: http://bugs.launchpad.net/bugs/1707233
commit 2ec420b26f7b6ff332393f0bb5a7d245f7ad87f0 upstream.

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
Patchwork: https://patchwork.linux-mips.org/patch/16148/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
arch/mips/kernel/syscall.c