From owner-svn-src-user@FreeBSD.ORG Sun Jan 10 02:31:06 2010 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EAFE106566B; Sun, 10 Jan 2010 02:31:06 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7D8478FC12; Sun, 10 Jan 2010 02:31:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0A2V6Ku088773; Sun, 10 Jan 2010 02:31:06 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0A2V6NK088772; Sun, 10 Jan 2010 02:31:06 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <201001100231.o0A2V6NK088772@svn.freebsd.org> From: Kip Macy Date: Sun, 10 Jan 2010 02:31:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201969 - user/kmacy/releng_8_fcs_buf_xen/sys/dev/xen/console X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2010 02:31:06 -0000 Author: kmacy Date: Sun Jan 10 02:31:06 2010 New Revision: 201969 URL: http://svn.freebsd.org/changeset/base/201969 Log: fix lock recursion Modified: user/kmacy/releng_8_fcs_buf_xen/sys/dev/xen/console/console.c Modified: user/kmacy/releng_8_fcs_buf_xen/sys/dev/xen/console/console.c ============================================================================== --- user/kmacy/releng_8_fcs_buf_xen/sys/dev/xen/console/console.c Sun Jan 10 00:47:41 2010 (r201968) +++ user/kmacy/releng_8_fcs_buf_xen/sys/dev/xen/console/console.c Sun Jan 10 02:31:06 2010 (r201969) @@ -177,9 +177,6 @@ static boolean_t xcons_putc(int c) { int force_flush = xc_mute || -#ifdef DDB - db_active || -#endif panicstr; /* we're not gonna recover, so force * flush */ @@ -386,15 +383,17 @@ xc_timeout(void *v) tp = (struct tty *)v; - tty_lock(tp); - while ((c = xccncheckc(NULL)) != -1) + while ((c = xccncheckc(NULL)) != -1) { + tty_lock(tp); ttydisc_rint(tp, c, 0); - + tty_unlock(tp); + } if (xc_start_needed) { xc_start_needed = FALSE; + tty_lock(tp); xcoutwakeup(tp); + tty_unlock(tp); } - tty_unlock(tp); callout_reset(&xc_callout, XC_POLLTIME, xc_timeout, tp); }