mirror of https://gitee.com/openkylin/linux.git
8497695243
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:
|
||
---|---|---|
.. | ||
Makefile | ||
delay.c | ||
find.c | ||
mem.S | ||
probes.c | ||
spinlock.c | ||
string.c | ||
uaccess.c | ||
xor.c |