]> CyberLeo.Net >> Repos - FreeBSD/releng/9.1.git/commit
MFC r239095: Do not add handler to event handlers list until ithread
authorkan <kan@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 20 Aug 2012 15:19:34 +0000 (15:19 +0000)
committerkan <kan@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 20 Aug 2012 15:19:34 +0000 (15:19 +0000)
commit415433ae3b66ec27faae9f2e956159f814f639c4
tree4f4a600f15ed83cdc1958f3cc54288a6d4ca2f63
parent31148ca2ff5d11a911754c8f5e64ee67856111de
MFC r239095: Do not add handler to event handlers list until ithread
is created.

In rare event when fast and ithread interrupts share the same vector
and the fast handler was registered first, we can end up trying to
schedule the ithread that is not created yet. The kernel built with
INVARIANTS then triggers an assertion.

Change the order to create the ithread first and only then add the
handler that needs it to the interrupt event handlers list.

Approved by: re (kib)
Reviewed by: jhb

git-svn-id: svn://svn.freebsd.org/base/releng/9.1@239437 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/kern/kern_intr.c