linux/arch/s390/lib
Heiko Carstens 2ba121ced9 s390/spinlock: avoid yield to non existent cpu
commit 8497695243 upstream.

arch_spin_lock_wait_flags() checks if a spinlock is not held before
trying a compare and swap instruction. If the lock is unlocked it
tries the compare and swap instruction, however if a different cpu
grabbed the lock in the meantime the instruction will fail as
expected.

Subsequently the arch_spin_lock_wait_flags() incorrectly tries to
figure out if the cpu that holds the lock is running. However it is
using the wrong cpu number for this (-1) and then will also yield the
current cpu to the wrong cpu.

Fix this by adding a missing continue statement.

Fixes: 470ada6b1a ("s390/spinlock: refactor arch_spin_lock_wait[_flags]")
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2016-06-15 21:29:24 +01:00
..
delay.c s390/time: correct use of store clock fast 2013-10-22 09:16:40 +02:00
div64.c s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
find.c s390/bitops: fix comment 2014-02-21 08:50:20 +01:00
Makefile s390/uaccess: rework uaccess code - fix locking issues 2014-04-03 14:31:04 +02:00
mem32.S s390/string: provide asm lib functions for memcpy and memcmp 2012-09-26 15:44:50 +02:00
mem64.S s390/string: provide asm lib functions for memcpy and memcmp 2012-09-26 15:44:50 +02:00
qrnnd.S [S390] fix s390 assembler code alignments 2011-07-24 10:48:21 +02:00
spinlock.c s390/spinlock: avoid yield to non existent cpu 2016-06-15 21:29:24 +01:00
string.c s390/string: provide asm lib functions for memcpy and memcmp 2012-09-26 15:44:50 +02:00
uaccess.c s390/uaccess: simplify control register updates 2014-05-20 08:58:46 +02:00
ucmpdi2.c [S390] add __ucmpdi2() helper function 2009-07-07 16:37:53 +02:00