Date: Wed, 26 Sep 2012 16:52:22 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: Ed Maste <emaste@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r240938 - head/sys/net Message-ID: <20120926135222.GK35915@deviant.kiev.zoral.com.ua> In-Reply-To: <CAPyFy2ArzaRzpRKADQdOfyz2%2BO%2B%2BukSSEZUGpcK5YeGhUqcGvw@mail.gmail.com> References: <201209252210.q8PMAEx5003950@svn.freebsd.org> <20120926045204.GG35915@deviant.kiev.zoral.com.ua> <CAPyFy2ArzaRzpRKADQdOfyz2%2BO%2B%2BukSSEZUGpcK5YeGhUqcGvw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--PEfPc/DjvCj+JzNg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 26, 2012 at 08:48:03AM -0400, Ed Maste wrote: > On 26 September 2012 00:52, Konstantin Belousov <kostikbel@gmail.com> wro= te: > > On Tue, Sep 25, 2012 at 10:10:14PM +0000, Ed Maste wrote: > >> Author: emaste > >> Date: Tue Sep 25 22:10:14 2012 > >> New Revision: 240938 > >> URL: http://svn.freebsd.org/changeset/base/240938 > >> > >> Log: > >> Avoid INVARIANTS panic destroying an in-use tap(4) > >> > >> The requirement (implied by the KASSERT in tap_destroy) that the tap= is > >> closed isn't valid; destroy_dev will block in devdrn while other thr= eads > >> are in d_* functions. > > Are you sure ? > > > > The device may be opened, but no threads could be in any cdevsw > > methods. destroy_dev(9) only waits for threads to leave cdevsw methods, > > and not for the close to happen. >=20 > My first approach mirrored if_tun, but jhb@ pointed out on IRC that > any open devices will revert to dead_devsw so that future accesses > will fail. Yes, I do understand about the devfs part. My question is about the driver readiness for destruction while in the open state. --PEfPc/DjvCj+JzNg Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAlBjCJYACgkQC3+MBN1Mb4h5fgCdFwXJRs7tmF6br2UZw7u0rE51 E7sAnjtdoFzpiwGKj/Wk+G3iMfE6viVm =I8By -----END PGP SIGNATURE----- --PEfPc/DjvCj+JzNg--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120926135222.GK35915>