From owner-cvs-all@FreeBSD.ORG Mon Sep 11 15:36:15 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 7E52016A412; Mon, 11 Sep 2006 15:36:15 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id AE1A643D46; Mon, 11 Sep 2006 15:36:14 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id k8BFaBYw017420; Mon, 11 Sep 2006 11:36:12 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Martin Blapp Date: Mon, 11 Sep 2006 10:48:18 -0400 User-Agent: KMail/1.9.1 References: <200609101651.k8AGpuqm069774@repoman.freebsd.org> In-Reply-To: <200609101651.k8AGpuqm069774@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200609111048.19397.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Mon, 11 Sep 2006 11:36:12 -0400 (EDT) X-Virus-Scanned: ClamAV 0.88.3/1857/Mon Sep 11 11:12:56 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: cvs-src@freebsd.org, 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 15:36:15 -0000 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. Abusing the wrong lock is only going to narrow the race, not fix it. -- John Baldwin