Debug bits for the tty ldisc problem
cover Debug bits for the tty ldisc problem
See if this turns anything up or fixes it. I'm not 100% sure the close one is safe for locking but as the lock detector has been busted since 2.6.30 its a bit hard to be sure.
---
Alan Cox (2):
ldisc: debug aids
ldisc: Make sure the ldisc isn't active when we close it
drivers/char/tty_ldisc.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
Signature · 3 lines
"In flight refueling scares me. It's like two elephants mating at mach one" -- Arjan van de Ven
PATCH 1/2 ldisc: Make sure the ldisc isn't active when we close it
From: Alan Cox <[email protected]>
---
drivers/char/tty_ldisc.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/char/tty_ldisc.c +2 -0
@@ -793,6 +793,8 @@ void tty_ldisc_hangup(struct tty_struct *tty)/* Avoid racing set_ldisc */ mutex_lock (&tty->ldisc_mutex);/* Switch back to N_TTY */ +tty_ldisc_halt (tty); +tty_ldisc_wait_idle (tty);tty_ldisc_reinit (tty);/* At this point we have a closed ldisc and we want to reopen it. We could defer this to the next open but
PATCH 2/2 ldisc: debug aids
In reply to Alan CoxFrom: Alan Cox <[email protected]>
---
drivers/char/tty_ldisc.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/char/tty_ldisc.c +1 -0
@@ -207,6 +207,7 @@ static void tty_ldisc_put(struct tty_ldisc *ld) ldo->refcount--;module_put (ldo->owner);spin_unlock_irqrestore (&tty_ldisc_lock, flags); +WARN_ON (ld->refcount);kfree (ld); }
Quoted 3 lines · Alan Cox
I'm not 100% sure the close one is
safe for locking but as the lock detector has been busted since 2.6.30 its a bit hard to be sure.
Would you have some specifics?
Quoted 6 lines · On Mon, 15 Jun 2009 16:39:56 +0200 Peter Zijlstra <[email protected]> wrote:
Quoted 3 lines · Alan Cox
I'm not 100% sure the close one is
safe for locking but as the lock detector has been busted since 2.6.30 its a bit hard to be sure.Would you have some specifics?
I stuck it in bugzilla basically it blows up with a
BUG: MAX_STACK_TRACE_ENTRIES too low! turning off the locking correctness
validator.
and has done for ages.
Quoted 8 lines · Alan Cox
Quoted 5 lines · On Mon, 15 Jun 2009 16:39:56 +0200 Peter Zijlstra <[email protected]> wrote:
Quoted 3 lines · Alan Cox
I'm not 100% sure the close one is
safe for locking but as the lock detector has been busted since 2.6.30 its a bit hard to be sure.
Quoted 8 lines
Quoted 1 line
Would you have some specifics?
I stuck it in bugzilla basically it blows up with a
BUG: MAX_STACK_TRACE_ENTRIES too low! turning off the lockingcorrectness validator.
and has done for ages.
It's hitting a simple limit. Please try the patch below - it quadruples the value printed in the warning (the number of entries)
- does that get your system going?
Lock validation is getting more and more popular, covering now a lot more than just locks (workqueues, timers, etc.), so the max number of entries is steadily increasing. Some configs will run into this faster.
Ingo
kernel/lockdep_internals.h +1 -1
@@ -65,7 +65,7 @@ enum {* Stack-trace: tightly packed array of stack backtrace * addresses. Protected by the hash_lock. */ -#define MAX_STACK_TRACE_ENTRIES 262144UL +#define MAX_STACK_TRACE_ENTRIES 1048576ULextern struct list_head all_lock_classes;extern struct lock_chain lock_chains[];