Re: [PATCH] MIPS: __raw_spin_lock() spins forever on ticket wrap.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 27, 2009 at 10:07:02AM -0700, David Daney wrote:

> 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.

Thanks, applied!

  Ralf


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux