Commit 0e6826c7 authored by Committed by Ralf Baechle
MIPS: __raw_spin_lock() may spin forever on ticket wrap.
If the lock is not acquired and has to spin *and* the second attempt to acquire the lock fails, the delay time is not masked by the ticket range mask. If the ticket number wraps around to zero, the result is that the lock sampling delay is essentially infinite (due to casting -1 to an unsigned int). The fix: Always mask the difference between my_ticket and the current ticket value before calculating the delay. Signed-off-by: David Daney <firstname.lastname@example.org> Signed-off-by: Ralf Baechle <email@example.com>
Showing with 4 additions and 4 deletions