From owner-cvs-src@FreeBSD.ORG Fri Aug 20 21:47:48 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9893616A4CE; Fri, 20 Aug 2004 21:47:48 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9026243D45; Fri, 20 Aug 2004 21:47:48 +0000 (GMT) (envelope-from truckman@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i7KLlmSN040924; Fri, 20 Aug 2004 21:47:48 GMT (envelope-from truckman@repoman.freebsd.org) Received: (from truckman@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i7KLlmPR040923; Fri, 20 Aug 2004 21:47:48 GMT (envelope-from truckman) Message-Id: <200408202147.i7KLlmPR040923@repoman.freebsd.org> From: Don Lewis Date: Fri, 20 Aug 2004 21:47:48 +0000 (UTC) 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_module.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Aug 2004 21:47:48 -0000 truckman 2004-08-20 21:47:48 UTC FreeBSD src repository Modified files: sys/kern kern_module.c Log: Don't bother calling the module event handlers from module_shutdown() in the shutdown_final state if the RB_NOSYNC flag is set. The specific motivation in this case is that a system panic in an interrupt context results in a call to module_shutdown(), which calls g_modevent(), which calls g_malloc(..., M_WAITOK), which results in a second panic. While g_modevent() could be fixed to not call malloc() for MOD_SHUTDOWN events (which it doesn't handle in any case), it is probably also a good idea to entirely skip the execution of the module shutdown handlers after a panic. This may be a MFC candidate for RELENG_5. Revision Changes Path 1.46 +3 -0 src/sys/kern/kern_module.c