From owner-cvs-all@FreeBSD.ORG Tue Jan 13 16:12:23 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6741C16A4CF for ; Tue, 13 Jan 2004 16:12:23 -0800 (PST) Received: from root.org (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id 5F2F143D6B for ; Tue, 13 Jan 2004 16:12:15 -0800 (PST) (envelope-from nate@root.org) Received: (qmail 63800 invoked by uid 1000); 14 Jan 2004 00:12:16 -0000 Date: Tue, 13 Jan 2004 16:12:16 -0800 (PST) From: Nate Lawson To: Don Lewis In-Reply-To: <20040113225601.7F47416A4D2@hub.freebsd.org> Message-ID: <20040113161105.E63442@root.org> References: <20040113225601.7F47416A4D2@hub.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_intr.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2004 00:12:23 -0000 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