From owner-svn-src-all@FreeBSD.ORG Wed Sep 26 13:52:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42162106566B; Wed, 26 Sep 2012 13:52:31 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 949FC8FC14; Wed, 26 Sep 2012 13:52:30 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q8QDqZGP099551; Wed, 26 Sep 2012 16:52:35 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q8QDqMTg096643; Wed, 26 Sep 2012 16:52:22 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q8QDqMri096642; Wed, 26 Sep 2012 16:52:22 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 26 Sep 2012 16:52:22 +0300 From: Konstantin Belousov To: Ed Maste Message-ID: <20120926135222.GK35915@deviant.kiev.zoral.com.ua> References: <201209252210.q8PMAEx5003950@svn.freebsd.org> <20120926045204.GG35915@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PEfPc/DjvCj+JzNg" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r240938 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Sep 2012 13:52:31 -0000 --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 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--