From 15589b25c9171d800bd0faf570d6b48da1e1270f Mon Sep 17 00:00:00 2001 From: Kyle McMartin Date: Mon, 22 Nov 2010 18:15:07 -0500 Subject: [PATCH] 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(+) create mode 100644 debug-tty-print-dev-name.patch diff --git a/debug-tty-print-dev-name.patch b/debug-tty-print-dev-name.patch new file mode 100644 index 000000000..720f6632d --- /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 507bc7a01..adcef1b77 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 +- Add a debugging patch to help track down which tty is being + poked by plymouth. + * Mon Nov 22 2010 Kyle McMartin 2.6.36.1-9 - Linux stable 2.6.36.1