Date: Wed, 12 Oct 2005 12:40:14 +1300 From: Andrew Thompson <thompsa@freebsd.org> To: Brooks Davis <brooks@one-eyed-alien.net> Cc: Yar Tikhiy <yar@comp.chem.msu.su>, Pawel Jakub Dawidek <pjd@freebsd.org>, FreeBSD Current <current@freebsd.org> Subject: Re: panic: ifc_free_unit: bit is already cleared Message-ID: <20051011234014.GA6179@heff.fud.org.nz> In-Reply-To: <20051011220749.GD13461@odin.ac.hmc.edu> References: <20051005024903.GA72743@heff.fud.org.nz> <20051005203639.GA20552@garage.freebsd.pl> <20051005205515.GA30350@odin.ac.hmc.edu> <20051005210950.GB75848@heff.fud.org.nz> <20051009232849.GA27349@comp.chem.msu.su> <20051010022208.GA97249@heff.fud.org.nz> <20051010202900.GA24213@odin.ac.hmc.edu> <20051011210602.GA5714@heff.fud.org.nz> <20051011220749.GD13461@odin.ac.hmc.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Oct 11, 2005 at 03:07:49PM -0700, Brooks Davis wrote: > On Wed, Oct 12, 2005 at 10:06:02AM +1300, Andrew Thompson wrote: > > On Mon, Oct 10, 2005 at 01:29:00PM -0700, Brooks Davis wrote: > > > On Mon, Oct 10, 2005 at 03:22:08PM +1300, Andrew Thompson wrote: > > > > I have been testing this patch and I think it fixes all the problems > > > > discussed. > > > > > > > > > > I don't see any reason why you can't just replace the specific destroy > > > calls with calls to ifc_simple_destroy(). That would avoid expanding > > > the API. > > > > I have updated the patch and yes, its a nicer way to do it. Please > > review. > > > > Ive run through interations of create/kldunload with bridge, disc, > > faith, gif, gre and ppp with extra printf's and its freeing correctly. > > This looks good to me, thanks for working on this and doing the > <ifn>_destory removals. Let's see about getting this committed. > There was one problem where pflog0 would loop on EINVAL since it was a precloned device, livelocking the system. This addition fixes it, it was either this or a dying flag. void if_clone_detach(struct if_clone *ifc) { + struct ifc_simple_data *ifcs = ifc->ifc_data; IF_CLONERS_LOCK(); LIST_REMOVE(ifc, ifc_list); if_cloners_count--; IF_CLONERS_UNLOCK(); + /* Allow all to be destroyed */ + ifcs->ifcs_minifs = 0; + IF_CLONE_REMREF(ifc); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051011234014.GA6179>