Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Jan 2008 21:30:22 GMT
From:      Kip Macy <kmacy@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 133596 for review
Message-ID:  <200801182130.m0ILUMDb081965@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=133596

Change 133596 by kmacy@pandemonium:kmacy:xen31 on 2008/01/18 21:30:00

	don't acquire the console lock if we're in the middle of a panic

Affected files ...

.. //depot/projects/xen31/sys/dev/xen/console/console.c#9 edit

Differences ...

==== //depot/projects/xen31/sys/dev/xen/console/console.c#9 (text+ko) ====

@@ -79,8 +79,16 @@
 #define CN_LOCK_INIT(x, _name) \
         mtx_init(&x, _name, NULL, MTX_SPIN|MTX_RECURSE)
 
-#define CN_LOCK(l)        mtx_lock_spin(&(l))
-#define CN_UNLOCK(l)      mtx_unlock_spin(&(l))
+#define CN_LOCK(l)        								\
+		do {											\
+				if (panicstr == NULL)					\
+                        mtx_lock_spin(&(l));			\
+		} while (0)
+#define CN_UNLOCK(l)        							\
+		do {											\
+				if (panicstr == NULL)					\
+                        mtx_unlock_spin(&(l));			\
+		} while (0)
 #define CN_LOCK_ASSERT(x)    mtx_assert(&x, MA_OWNED)
 #define CN_LOCK_DESTROY(x)   mtx_destroy(&x)
 



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