From owner-cvs-src@FreeBSD.ORG Tue Jul 3 17:46:38 2007 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 68C5516A400; Tue, 3 Jul 2007 17:46:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 42EEC13C4BD; Tue, 3 Jul 2007 17:46:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l63HkcVk097015; Tue, 3 Jul 2007 17:46:38 GMT (envelope-from kib@repoman.freebsd.org) Received: (from kib@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l63HkccW097014; Tue, 3 Jul 2007 17:46:38 GMT (envelope-from kib) Message-Id: <200707031746.l63HkccW097014@repoman.freebsd.org> From: Konstantin Belousov Date: Tue, 3 Jul 2007 17:46:37 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/kern tty_tty.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2007 17:46:38 -0000 kib 2007-07-03 17:46:37 UTC FreeBSD src repository Modified files: sys/kern tty_tty.c Log: Lock Giant and proctree lock around dereferencing p_session->s_ttyvp->v_rdev. Lock cdev mutex too to close the race with tty being freed. Relock clone_drain_lock to prevent the LOR with proctree lock, thus add #include . Suggested by: tegge Debugging help and testing by: Peter Holm Approved by: re (kensmith) Revision Changes Path 1.60 +13 -1 src/sys/kern/tty_tty.c