From owner-cvs-all@FreeBSD.ORG Thu May 5 03:49:03 2005 Return-Path: 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 8711616A4CE; Thu, 5 May 2005 03:49:03 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6EF1943D31; Thu, 5 May 2005 03:49:03 +0000 (GMT) (envelope-from dwhite@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j453m8xK010286; Thu, 5 May 2005 03:48:08 GMT (envelope-from dwhite@repoman.freebsd.org) Received: (from dwhite@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j453m8aC010285; Thu, 5 May 2005 03:48:08 GMT (envelope-from dwhite) Message-Id: <200505050348.j453m8aC010285@repoman.freebsd.org> From: Doug White Date: Thu, 5 May 2005 03:48:08 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: RELENG_5 Subject: cvs commit: src/sys/kern tty.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 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: Thu, 05 May 2005 03:49:03 -0000 dwhite 2005-05-05 03:48:08 UTC FreeBSD src repository Modified files: (Branch: RELENG_5) sys/kern tty.c Log: Commit a workaround to panics in ttwwakeup() during open and closes of the terminal sharing /dev/console. Peek at tty structs passing through ttymalloc() and pass them to ttyrel() if they'd get reaped due to the refcount dropping to 0. Also loosen up the refcount check in ttyrel() to account for refcounting problems caused by the incestuous relationship. I left the KASSERT alone in case people want to look into the underlying issue. Reaping dying tty structs helps keep stale data from growing in the knote lists, which eventually get tripped over, causing the panic. This change does not apply to -CURRENT due to differences in tty handling. MFC after: 3 days Revision Changes Path 1.228.2.4 +12 -2 src/sys/kern/tty.c