]> git.karo-electronics.de Git - karo-tx-linux.git/commit
s390/spinlock: fix system hang with spin_retry <= 0
authorGerald Schaefer <gerald.schaefer@de.ibm.com>
Tue, 6 May 2014 17:41:36 +0000 (19:41 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 7 May 2014 08:07:49 +0000 (10:07 +0200)
commit88140456967a9db9449178640aa688d165e8c446
treeecd597e2c7d762670c2bab396e08a69ab43b4666
parent1eb5e8b7449ff017c2f358d97bd2fcd4eb87cc53
s390/spinlock: fix system hang with spin_retry <= 0

On LPAR, when spin_retry is set to <= 0, arch_spin_lock_wait() and
arch_spin_lock_wait_flags() may end up in a while(1) loop w/o doing
any compare and swap operation. To fix this, use do/while instead of
for loop.

Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/lib/spinlock.c