PERFORCE change 146139 for review

Ed Schouten ed at FreeBSD.org
Mon Jul 28 18:08:42 UTC 2008


http://perforce.freebsd.org/chv.cgi?CH=146139

Change 146139 by ed at ed_dull on 2008/07/28 18:08:12

	I forgot to realize /dev/console also picks up Giant. This means
	we can actually recurse on the TTY lock, if it's Giant.

Affected files ...

.. //depot/projects/mpsafetty/sys/kern/tty.c#8 edit

Differences ...

==== //depot/projects/mpsafetty/sys/kern/tty.c#8 (text+ko) ====

@@ -1168,7 +1168,11 @@
 	int error;
 	int revokecnt = tp->t_revokecnt;
 
+#if 0
+	/* XXX: /dev/console also picks up Giant */
 	tty_lock_assert(tp, MA_OWNED|MA_NOTRECURSED);
+#endif
+	tty_lock_assert(tp, MA_OWNED);
 
 	if (tp->t_mtx == &Giant) {
 		/*
@@ -1200,7 +1204,11 @@
 	int error;
 	int revokecnt = tp->t_revokecnt;
 
+#if 0
+	/* XXX: /dev/console also picks up Giant */
 	tty_lock_assert(tp, MA_OWNED|MA_NOTRECURSED);
+#endif
+	tty_lock_assert(tp, MA_OWNED);
 
 	if (tp->t_mtx == &Giant) {
 		/*


More information about the p4-projects mailing list