From owner-cvs-all@FreeBSD.ORG Mon Sep 11 16:30:45 2006 Return-Path: X-Original-To: cvs-all@freebsd.org Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8589B16A407; Mon, 11 Sep 2006 16:30:45 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.186]) by mx1.FreeBSD.org (Postfix) with ESMTP id EC1B343D46; Mon, 11 Sep 2006 16:30:06 +0000 (GMT) (envelope-from max@love2party.net) Received: from [88.64.183.32] (helo=amd64.laiers.local) by mrelayeu.kundenserver.de (node=mrelayeu4) with ESMTP (Nemesis), id 0ML21M-1GMofc3YRD-0002lo; Mon, 11 Sep 2006 18:30:05 +0200 From: Max Laier Organization: FreeBSD To: John Baldwin Date: Mon, 11 Sep 2006 18:29:49 +0200 User-Agent: KMail/1.9.3 References: <200609101651.k8AGpuqm069774@repoman.freebsd.org> <200609111048.19397.jhb@freebsd.org> In-Reply-To: <200609111048.19397.jhb@freebsd.org> X-Face: ,,8R(x[kmU]tKN@>gtH1yQE4aslGdu+2]; R]*pL,U>^H?)gW@49@wdJ`H<=?utf-8?q?=25=7D*=5FBD=0A=09U=5For=3D=5CmOZf764=26nYj=3DJYbR1PW0ud?=>|!~,,CPC.1-D$FG@0h3#'5"k{V]a~.<=?utf-8?q?mZ=7D44=23Se=7Em=0A=09Fe=7E=5C=5DX5B=5D=5Fxj?=(ykz9QKMw_l0C2AQ]}Ym8)fU MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart386048602.HvDESxJNFe"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200609111829.58796.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:61c499deaeeba3ba5be80f48ecc83056 Cc: cvs-src@freebsd.org, Martin Blapp , src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/kern tty.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Sep 2006 16:30:45 -0000 --nextPart386048602.HvDESxJNFe Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Monday 11 September 2006 16:48, John Baldwin wrote: > On Sunday 10 September 2006 12:51, Martin Blapp wrote: > > mbr 2006-09-10 16:51:56 UTC > > > > FreeBSD src repository > > > > Modified files: > > sys/kern tty.c > > Log: > > Fix locking race in ttymodem(). The locking of the proctree happens > > too late and opens a small race window before tp->t_session->s_leader > > is accessed. In case tp->t_session has just been set to NULL > > elsewhere, we get a panic(). > > > > This fix is a bandaid until someone else fixes the whole locking in > > the tty subsystem. Definitly more work needs to be done. > > > > MFC after: 1 week > > Reviewed by: mlaier > > PR: kern/103101 > > Did you ever try putting a 'mtx_assert(&Giant, MA_OWNED);' in place to > see if Giant is held there? Until the tty system is locked, the proper > fix is to put Giant back on top of it, not abuse the wrong lock.=20 > Abusing the wrong lock is only going to narrow the race, not fix it. Unless, of course, the offending call path (the one entering the tty code=20 w/o Giant) holds the "wrong lock", which - in this case - is likely as a=20 change of t_session means something was fiddling with the proctree. Martin was trying to get you and others involved with this beforehand. =20 This commit is - as indicated in the commit message - a bandaid that=20 fixes the apparent problem. In Martin's installation this problem=20 manifests in panic()ing every other hour - I don't think that's a system=20 state we want to ship as FreeBSD 6.2. This is why we decided to commit=20 the bandaid now, after Martin's other requests for help and input timed=20 out. Seems like the plan worked and people start looking at this, now ;) =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --nextPart386048602.HvDESxJNFe Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQBFBY8GXyyEoT62BG0RAhibAJ4nxKYAkm4fofm8neE/vUoZdGkXfwCdGRAV f4QmpEP8bSh953kltR4WFik= =qUU0 -----END PGP SIGNATURE----- --nextPart386048602.HvDESxJNFe--