Date: Sun, 18 Sep 2005 10:58:30 -0600 (MDT) From: "M. Warner Losh" <imp@bsdimp.com> To: ru@freebsd.org Cc: wpaul@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org, jhb@freebsd.org, cvs-src@freebsd.org Subject: Re: cvs commit: src/sys/dev/re if_re.c Message-ID: <20050918.105830.20030981.imp@bsdimp.com> In-Reply-To: <20050918163457.GA43796@ip.net.ua> References: <20050917101552.GC22151@ip.net.ua> <20050918030610.64B5616A420@hub.freebsd.org> <20050918163457.GA43796@ip.net.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <20050918163457.GA43796@ip.net.ua> Ruslan Ermilov <ru@FreeBSD.org> writes: : That's clear. I'm talking about fixing all drivers for the : BPF detach bug. The more I think about it, the more I think you may have been right about a flag. While I recoiled against it at first, I think that it is the only long term solution to these kinds of bugs. The reason I think this is that we have a number of races on detach. The bpf one is just an annoying one right now, but what if dhclient does an ioctl while we're detaching. What if there's an ifconfig done during the detach, etc. Sure, we can fix the bpf case using the complicated logic that was worked out here, but that still leaves a number of other races to worry about. If we're going to fix all the drivers in the tree, I think we should add a 'dying' flag that we could use for the ioctl (and other) requests to return an error and do nothing. The other option would be to move this up a layer. For device nodes, for example, we connect them to deadfs early in the destruction process. If we did something similar to the ifnet entry points, then we would fix all the drivers with one fell swoop, rather than doing it piecemeal. Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050918.105830.20030981.imp>