From owner-cvs-all@FreeBSD.ORG Tue Jan 13 14:55:47 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 ED99716A4CE; Tue, 13 Jan 2004 14:55:47 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2CF3C43D55; Tue, 13 Jan 2004 14:55:47 -0800 (PST) (envelope-from truckman@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i0DMtk0B071957; Tue, 13 Jan 2004 14:55:46 -0800 (PST) (envelope-from truckman@repoman.freebsd.org) Received: (from truckman@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i0DMtk0H071956; Tue, 13 Jan 2004 14:55:46 -0800 (PST) (envelope-from truckman) Message-Id: <200401132255.i0DMtk0H071956@repoman.freebsd.org> From: Don Lewis Date: Tue, 13 Jan 2004 14:55:46 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: 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: Tue, 13 Jan 2004 22:55:48 -0000 truckman 2004/01/13 14:55:46 PST FreeBSD src repository 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