Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Jan 2010 02:31:06 +0000 (UTC)
From:      Kip Macy <kmacy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r201969 - user/kmacy/releng_8_fcs_buf_xen/sys/dev/xen/console
Message-ID:  <201001100231.o0A2V6NK088772@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001100231.o0A2V6NK088772>