From owner-cvs-all@FreeBSD.ORG Sun Sep 10 16:55:30 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 32B1F16A403; Sun, 10 Sep 2006 16:55:30 +0000 (UTC) (envelope-from mb@imp.ch) Received: from pop.imp.ch (mx2.imp.ch [157.161.9.17]) by mx1.FreeBSD.org (Postfix) with ESMTP id A42FC43D49; Sun, 10 Sep 2006 16:55:29 +0000 (GMT) (envelope-from mb@imp.ch) Received: from godot.imp.ch (godot.imp.ch [157.161.4.8]) by pop.imp.ch (8.13.8/8.13.8/Submit_imp) with ESMTP id k8AGtQGB062005; Sun, 10 Sep 2006 18:55:26 +0200 (CEST) (envelope-from mb@imp.ch) Date: Sun, 10 Sep 2006 18:55:26 +0200 (CEST) From: Martin Blapp To: Martin Blapp In-Reply-To: <200609101651.k8AGpuqm069774@repoman.freebsd.org> Message-ID: <20060910185343.E1494@godot.imp.ch> References: <200609101651.k8AGpuqm069774@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Scanned-By: MIMEDefang 2.57 on 157.161.9.65 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: Sun, 10 Sep 2006 16:55:30 -0000 Hi, Since nobody wants to burn his fingers and touch the tty subsystem, I've committed this fix as a bandaid to CURRENT and will MCF it after a week. More work is needed to properly lock and protect the tty subsystem of course. During two month of testing this patch stopped the frequent panics we got on our SMP systems. I'm willing to do the tty locking changes if someone helps me to do it and reviews the changes. -- Martin On Sun, 10 Sep 2006, 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 > > Revision Changes Path > 1.258 +2 -2 src/sys/kern/tty.c >