Date: Mon, 2 Mar 2009 10:30:11 +0100 From: Ed Schouten <ed@80386.nl> To: Yuriy Tsibizov <Yuriy.Tsibizov@gfk.com> Cc: FreeBSD Current <freebsd-current@freebsd.org> Subject: Re: mutex Giant recursed at /usr/src/sys/kern/tty.c:1222 (via linux_ioctl_termio) Message-ID: <20090302093011.GE19161@hoeg.nl> In-Reply-To: <20090302092652.GD19161@hoeg.nl> References: <BA0C4C2EEBEBFD448415F22CE73EEC0C13CA10@ex-be-1.hhp.local> <20090302092652.GD19161@hoeg.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
--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 <ed@80386.nl> 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090302093011.GE19161>