Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Jan 2004 16:12:16 -0800 (PST)
From:      Nate Lawson <nate@root.org>
To:        Don Lewis <truckman@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/kern kern_intr.c
Message-ID:  <20040113161105.E63442@root.org>
In-Reply-To: <20040113225601.7F47416A4D2@hub.freebsd.org>
References:  <20040113225601.7F47416A4D2@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 13 Jan 2004, Don Lewis wrote:
>   Modified files:
>     sys/kern             kern_intr.c
>   Log:
>   If a device attach routine fails during boot and calls bus_teardown_intr(),
>   ithread_remove_handler() may fail to remove the interrupt handler if
>   it decides to let the ithread do the removal.  The problem is that during
>   boot "cold" is set, which causes msleep() to return immediately.  This
>   will cause ithread_remove_handler() to fail to wait for the ithread
>   to do the removal from the handler TAILQ before freeing the handler
>   back to the heap.  Bad things will happen when some other user of the
>   TAILQ, such as ithread_add_handler() or the actual ithread attempts to use
>   the freed handler.  Fix the problem by forcing ithread_remove_handler()
>   to do the actual removal itself if the "cold" flag is set.
>
>   Reviewed by:    jhb
>
>   Revision  Changes    Path
>   1.104     +5 -1      src/sys/kern/kern_intr.c

tjr@ and truckman@ are leading the MVBF club (most valuable bug fixers).

-Nate



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040113161105.E63442>