Date: Tue, 26 Jun 2007 21:42:01 +0000 (UTC) From: Attilio Rao <attilio@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern kern_timeout.c Message-ID: <200706262142.l5QLg220018450@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
attilio 2007-06-26 21:42:01 UTC
FreeBSD src repository
Modified files:
sys/kern kern_timeout.c
Log:
Fix an old standing LOR between callout_lock and sleepqueues chain (which
could lead to a deadlock).
- sleepq_set_timeout acquires callout_lock (via callout_reset()) only
with sleepq chain lock held
- msleep_spin in _callout_stop_safe lock the sleepqueue chain with
callout_lock held
In order to solve this don't use msleep_spin in _callout_stop_safe() but
use directly sleepqueues as inline msleep_spin code. Rearrange the
wakeup path in order to have it consistent too.
Reported by: kris (via stress2 test suite)
Tested by: Timothy Redaelli <drizzt@gufi.org>
Reviewed by: jhb
Approved by: jeff (mentor)
Approved by: re
Revision Changes Path
1.104 +35 -3 src/sys/kern/kern_timeout.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200706262142.l5QLg220018450>
