[kernel] add a debugging patch around the tty_reopen WARN_ON

Kyle McMartin kyle at fedoraproject.org
Mon Nov 22 23:15:17 UTC 2010


commit 15589b25c9171d800bd0faf570d6b48da1e1270f
Author: Kyle McMartin <kyle at mcmartin.ca>
Date:   Mon Nov 22 18:15:07 2010 -0500

    add a debugging patch around the tty_reopen WARN_ON

 debug-tty-print-dev-name.patch |   17 +++++++++++++++++
 kernel.spec                    |    8 ++++++++
 2 files changed, 25 insertions(+), 0 deletions(-)
---
diff --git a/debug-tty-print-dev-name.patch b/debug-tty-print-dev-name.patch
new file mode 100644
index 0000000..720f663
--- /dev/null
+++ b/debug-tty-print-dev-name.patch
@@ -0,0 +1,17 @@
+diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
+index 613c852..09c86d2 100644
+--- a/drivers/char/tty_io.c
++++ b/drivers/char/tty_io.c
+@@ -1322,7 +1322,11 @@ static int tty_reopen(struct tty_struct *tty)
+ 	tty->driver = driver; /* N.B. why do this every time?? */
+ 
+ 	mutex_lock(&tty->ldisc_mutex);
+-	WARN_ON(!test_bit(TTY_LDISC, &tty->flags));
++	if (!test_bit(TTY_LDISC, &tty->flags)) {
++		printk("%s: !test_bit(TTY_LDISC, &tty->flags) dev=%s\n",
++			__func, tty->name);
++		WARN_ON(1);
++	}
+ 	mutex_unlock(&tty->ldisc_mutex);
+ 
+ 	return 0;
diff --git a/kernel.spec b/kernel.spec
index 507bc7a..adcef1b 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -609,6 +609,8 @@ Patch202: linux-2.6-debug-taint-vm.patch
 Patch203: linux-2.6-debug-vm-would-have-oomkilled.patch
 Patch204: linux-2.6-debug-always-inline-kzalloc.patch
 
+Patch210: debug-tty-print-dev-name.patch
+
 Patch380: linux-2.6-defaults-pci_no_msi.patch
 Patch381: linux-2.6-defaults-pci_use_crs.patch
 Patch383: linux-2.6-defaults-aspm.patch
@@ -1201,6 +1203,8 @@ ApplyPatch linux-2.6-debug-taint-vm.patch
 ###FIX###ApplyPatch linux-2.6-debug-vm-would-have-oomkilled.patch
 ApplyPatch linux-2.6-debug-always-inline-kzalloc.patch
 
+ApplyPatch debug-tty-print-dev-name.patch
+
 #
 # PCI
 #
@@ -1959,6 +1963,10 @@ fi
 #                 ||     ||
 
 %changelog
+* Mon Nov 22 2010 Kyle McMartin <kyle at redhat.com>
+- Add a debugging patch to help track down which tty is being
+  poked by plymouth.
+
 * Mon Nov 22 2010 Kyle McMartin <kyle at redhat.com> 2.6.36.1-9
 - Linux stable 2.6.36.1
 


More information about the scm-commits mailing list