From owner-p4-projects@FreeBSD.ORG Wed Aug 1 19:23:43 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4966C16A41F; Wed, 1 Aug 2007 19:23:43 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1E0D16A41B for ; Wed, 1 Aug 2007 19:23:42 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outV.internet-mail-service.net (outV.internet-mail-service.net [216.240.47.245]) by mx1.freebsd.org (Postfix) with ESMTP id CA13113C459 for ; Wed, 1 Aug 2007 19:23:42 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.32) with ESMTP; Wed, 01 Aug 2007 12:23:41 -0700 Received: from julian-mac.elischer.org (nat.ironport.com [63.251.108.100]) by idiom.com (Postfix) with ESMTP id 6BEB3125AF7; Wed, 1 Aug 2007 12:23:41 -0700 (PDT) Message-ID: <46B0DDE6.3060204@elischer.org> Date: Wed, 01 Aug 2007 12:24:22 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.5 (Macintosh/20070716) MIME-Version: 1.0 To: Marko Zec References: <200708011204.l71C4uW1001086@repoman.freebsd.org> In-Reply-To: <200708011204.l71C4uW1001086@repoman.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Perforce Change Reviews Subject: Re: PERFORCE change 124458 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Aug 2007 19:23:43 -0000 Marko Zec wrote: > http://perforce.freebsd.org/chv.cgi?CH=124458 > > Change 124458 by zec@zec_tpx32 on 2007/08/01 12:04:48 > > Per Julian's suggestion, if a netgraph node won't die, try > to kill it with NGF_REALLY_DIE flag set. > > IMO this should never happen given that no netgraph nodes > associated with any physical hardware should be present in > a dying vnet at this point, so print out a warning if we ever > encounter such an event, in which case it will need more work > and inspection, otherwise we could leak hardware devices on > vnet shutdown. > you might just always set this bit the first time around.. > Affected files ... > > .. //depot/projects/vimage/src/sys/netgraph/ng_base.c#14 edit > > Differences ... > > ==== //depot/projects/vimage/src/sys/netgraph/ng_base.c#14 (text+ko) ==== > > @@ -3222,8 +3222,17 @@ > node_p node, last_killed = NULL; > > while ((node = LIST_FIRST(&V_ng_nodelist)) != NULL) { > - if (node == last_killed) > - panic("netgraph node %s won't die", node->nd_name); > + if (node == last_killed) { > + /* This should never happen */ > + node->nd_flags |= NGF_REALLY_DIE; > + printf("netgraph node %s needs NGF_REALLY_DIE", > + node->nd_name); > + ng_rmnode(node, NULL, NULL, 0); > + /* This must never happen */ > + if (node == LIST_FIRST(&V_ng_nodelist)) > + panic("netgraph node %s won't die", > + node->nd_name); > + } > ng_rmnode(node, NULL, NULL, 0); > last_killed = node; > }