]> CyberLeo.Net >> Repos - FreeBSD/stable/9.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:16:43 +0000 (15:16 +0000)
committerkan <kan@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 20 Aug 2012 15:16:43 +0000 (15:16 +0000)
commit3e8f47b56bf12d14b1ded2f7ad0bdd557590fe6c
tree7888b2eb692a01a6c4e23324a5dfdc2ad94bfa6d
parent33d7d9257a9a66b3602db08491939e3e939d1ce0
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.

Reviewed by: jhb

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