aboutsummaryrefslogtreecommitdiff
path: root/net/socket.c
diff options
context:
space:
mode:
authorDavid Daney <ddaney@caviumnetworks.com>2009-03-27 10:07:02 -0700
committerRalf Baechle <ralf@linux-mips.org>2009-03-30 14:49:39 +0200
commit0e6826c73c9aa785ec58b52613df7699fb31af9a (patch)
treea85de8026984bbe94bf8ebc49873fcf0367782d9 /net/socket.c
parentf5fd02a33e9a53480c7c489d3210b144d24da24e (diff)
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 <ddaney@caviumnetworks.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'net/socket.c')
0 files changed, 0 insertions, 0 deletions