Date: Wed, 01 Aug 2007 12:24:22 -0700 From: Julian Elischer <julian@elischer.org> To: Marko Zec <zec@FreeBSD.org> Cc: Perforce Change Reviews <perforce@FreeBSD.org> Subject: Re: PERFORCE change 124458 for review Message-ID: <46B0DDE6.3060204@elischer.org> In-Reply-To: <200708011204.l71C4uW1001086@repoman.freebsd.org> References: <200708011204.l71C4uW1001086@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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; > }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?46B0DDE6.3060204>