Re: More power patches

Don Lewis <[email protected]>
Newsgroups gmane.os.freebsd.devel.mobile
Message-ID <[email protected]>
On 11 Jan, M. Warner Losh wrote:
> In message: <[email protected]>
>             Don Lewis <[email protected]> writes:

> : There is still the issue of the irq breakage caused by the attach
> : failure.
> 
> I don't understand that one at all..  Unless it is a failure message
> is a cut-n-pasto or something weird is happening.

There is something wierd happening.  The problem appears to be in
ithread_remove_handler() or ithread_loop().  ithread_remove_handler() is
executing the
	if (!TD_AWAITING_INTR(ithread->it_td)) {
condition and setting the IH_DEAD flag.  If this flag is set,
ithread_remove_handler() should msleep() to wait for the thread to do
the removal.  The problem is that ithread_remove_handler() doesn't
appear to sleep for any significant amount of time, and ithread_loop()
never seems to execute the the block of code that detects IH_DEAD and
executes TAILQ_REMOVE().  When ithread_remove_handler() calls
ithread_update() after the msleep() call, ithread_update() is still
finding the handler on the list, and then ithread_remove_handler()
proceeds to free the handler back to the heap where it is undoubtably
getting stomped on and causing havoc later on.

Is there a problem with calling msleep() this early in the boot
sequence?
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-mobile
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.