From owner-freebsd-current@FreeBSD.ORG Sat Jan 30 20:07:42 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C36131065694; Sat, 30 Jan 2010 20:07:42 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 64BE08FC14; Sat, 30 Jan 2010 20:07:42 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 81C851CEF1; Sat, 30 Jan 2010 21:07:41 +0100 (CET) Date: Sat, 30 Jan 2010 21:07:41 +0100 From: Ed Schouten To: Kostik Belousov Message-ID: <20100130200741.GG77705@hoeg.nl> References: <4B636812.8060403@FreeBSD.org> <20100130112749.GA1660@garage.freebsd.pl> <20100130114451.GB1660@garage.freebsd.pl> <4B647FAF.4090409@FreeBSD.org> <20100130193402.GB3877@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="213B/23bCmw+8GSd" Content-Disposition: inline In-Reply-To: <20100130193402.GB3877@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-hackers@freebsd.org, Alexander Motin , FreeBSD-Current , Pawel Jakub Dawidek , freebsd-geom@freebsd.org Subject: Re: Deadlock between GEOM and devfs device destroy and process exit. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Jan 2010 20:07:42 -0000 --213B/23bCmw+8GSd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi all, * Kostik Belousov wrote: > My exemplary case has been snp(4) before tty got rewritten, see r. 1.107 > of sys/dev/snp/snp.c. No calls to destroy_dev_sched() that I placed in > the src/ a kept around, that is good because corresponding subsystems > got serious rewrite. The current TTY code still uses destroy_dev_sched_cb(). In a very old version of the new TTY code, close() on a pseudo-terminal master device would also end up calling destroy_dev(), which meant it blocked until the TTY was closed as well, which is obviously not what it should do. I changed the TTY code to destroy_dev_sched_cb(), which means tty_gone() doesn't block. The TTY layer later calls a callback function, so the pts driver can deallocate the softc and reclaim the unit number (pts/%d). --=20 Ed Schouten WWW: http://80386.nl/ --213B/23bCmw+8GSd Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAktkkY0ACgkQ52SDGA2eCwWflQCdFWmTG3J08ANqTv7nfWwvgTqB B48An2Pi0/1RaRXOzwYoGOXgGBYinlHo =VEWu -----END PGP SIGNATURE----- --213B/23bCmw+8GSd--