From owner-freebsd-current@FreeBSD.ORG Mon Mar 2 09:30:12 2009 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 14D3610656E0 for ; Mon, 2 Mar 2009 09:30:12 +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 C97408FC28 for ; Mon, 2 Mar 2009 09:30:11 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 35E111CCED; Mon, 2 Mar 2009 10:30:11 +0100 (CET) Date: Mon, 2 Mar 2009 10:30:11 +0100 From: Ed Schouten To: Yuriy Tsibizov Message-ID: <20090302093011.GE19161@hoeg.nl> References: <20090302092652.GD19161@hoeg.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="IfZ7xA51UQS4uQU3" Content-Disposition: inline In-Reply-To: <20090302092652.GD19161@hoeg.nl> User-Agent: Mutt/1.5.19 (2009-01-05) Cc: FreeBSD Current Subject: Re: mutex Giant recursed at /usr/src/sys/kern/tty.c:1222 (via linux_ioctl_termio) 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: Mon, 02 Mar 2009 09:30:12 -0000 --IfZ7xA51UQS4uQU3 Content-Type: multipart/mixed; boundary="yqX3wpb4QnjwKg06" Content-Disposition: inline --yqX3wpb4QnjwKg06 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Yuriy, After a quick read it may be possible we don't actually require Giant to be held there. Could you please try the attached patch? Thanks. --=20 Ed Schouten WWW: http://80386.nl/ --yqX3wpb4QnjwKg06 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="linux-ioctl-giant.diff" Content-Transfer-Encoding: quoted-printable Index: sys/compat/linux/linux_ioctl.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sys/compat/linux/linux_ioctl.c (revision 189231) +++ sys/compat/linux/linux_ioctl.c (working copy) @@ -2635,19 +2635,16 @@ /* Iterate over the ioctl handlers */ cmd =3D args->cmd & 0xffff; sx_slock(&linux_ioctl_sx); - mtx_lock(&Giant); TAILQ_FOREACH(he, &handlers, list) { if (cmd >=3D he->low && cmd <=3D he->high) { error =3D (*he->func)(td, args); if (error !=3D ENOIOCTL) { - mtx_unlock(&Giant); sx_sunlock(&linux_ioctl_sx); fdrop(fp, td); return (error); } } } - mtx_unlock(&Giant); sx_sunlock(&linux_ioctl_sx); fdrop(fp, td); =20 --yqX3wpb4QnjwKg06-- --IfZ7xA51UQS4uQU3 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkmrpyMACgkQ52SDGA2eCwW1WwCfXnv2w53H+E0O8jyB3zTWyPKA Ur0An0q/UQjJT7pnQTvoiSqgnMk2MHOE =PEgf -----END PGP SIGNATURE----- --IfZ7xA51UQS4uQU3--