* Re: [PATCH 0/2] Debug bits for the tty ldisc problem
2009-06-15 15:32 [PATCH 0/2] Debug bits for the tty ldisc problem Alan Cox
@ 2009-06-15 14:39 ` Peter Zijlstra
2009-06-15 15:14 ` Alan Cox
2009-06-15 15:32 ` [PATCH 1/2] ldisc: Make sure the ldisc isn't active when we close it Alan Cox
2009-06-15 15:32 ` [PATCH 2/2] ldisc: debug aids Alan Cox
2 siblings, 1 reply; 6+ messages in thread
From: Peter Zijlstra @ 2009-06-15 14:39 UTC (permalink / raw)
To: Alan Cox; +Cc: mingo, linux-kernel
On Mon, 2009-06-15 at 16:32 +0100, Alan Cox wrote:
> 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?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] Debug bits for the tty ldisc problem
2009-06-15 14:39 ` Peter Zijlstra
@ 2009-06-15 15:14 ` Alan Cox
2009-06-15 15:19 ` Ingo Molnar
0 siblings, 1 reply; 6+ messages in thread
From: Alan Cox @ 2009-06-15 15:14 UTC (permalink / raw)
To: Peter Zijlstra; +Cc: mingo, linux-kernel
On Mon, 15 Jun 2009 16:39:56 +0200
Peter Zijlstra <peterz@infradead.org> wrote:
> On Mon, 2009-06-15 at 16:32 +0100, Alan Cox wrote:
> > 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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/2] Debug bits for the tty ldisc problem
2009-06-15 15:14 ` Alan Cox
@ 2009-06-15 15:19 ` Ingo Molnar
0 siblings, 0 replies; 6+ messages in thread
From: Ingo Molnar @ 2009-06-15 15:19 UTC (permalink / raw)
To: Alan Cox; +Cc: Peter Zijlstra, linux-kernel
* Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> On Mon, 15 Jun 2009 16:39:56 +0200
> Peter Zijlstra <peterz@infradead.org> wrote:
>
> > On Mon, 2009-06-15 at 16:32 +0100, Alan Cox wrote:
> > > 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.
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
diff --git a/kernel/lockdep_internals.h b/kernel/lockdep_internals.h
index 699a2ac..031f4c6 100644
--- a/kernel/lockdep_internals.h
+++ b/kernel/lockdep_internals.h
@@ -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 1048576UL
extern struct list_head all_lock_classes;
extern struct lock_chain lock_chains[];
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 0/2] Debug bits for the tty ldisc problem
@ 2009-06-15 15:32 Alan Cox
2009-06-15 14:39 ` Peter Zijlstra
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Alan Cox @ 2009-06-15 15:32 UTC (permalink / raw)
To: mingo, linux-kernel
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(-)
--
"In flight refueling scares me. It's like two elephants
mating at mach one"
-- Arjan van de Ven
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] ldisc: Make sure the ldisc isn't active when we close it
2009-06-15 15:32 [PATCH 0/2] Debug bits for the tty ldisc problem Alan Cox
2009-06-15 14:39 ` Peter Zijlstra
@ 2009-06-15 15:32 ` Alan Cox
2009-06-15 15:32 ` [PATCH 2/2] ldisc: debug aids Alan Cox
2 siblings, 0 replies; 6+ messages in thread
From: Alan Cox @ 2009-06-15 15:32 UTC (permalink / raw)
To: mingo, linux-kernel
From: Alan Cox <alan@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
---
drivers/char/tty_ldisc.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/char/tty_ldisc.c b/drivers/char/tty_ldisc.c
index 94b3e06..874c248 100644
--- a/drivers/char/tty_ldisc.c
+++ b/drivers/char/tty_ldisc.c
@@ -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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] ldisc: debug aids
2009-06-15 15:32 [PATCH 0/2] Debug bits for the tty ldisc problem Alan Cox
2009-06-15 14:39 ` Peter Zijlstra
2009-06-15 15:32 ` [PATCH 1/2] ldisc: Make sure the ldisc isn't active when we close it Alan Cox
@ 2009-06-15 15:32 ` Alan Cox
2 siblings, 0 replies; 6+ messages in thread
From: Alan Cox @ 2009-06-15 15:32 UTC (permalink / raw)
To: mingo, linux-kernel
From: Alan Cox <alan@linux.intel.com>
---
drivers/char/tty_ldisc.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/char/tty_ldisc.c b/drivers/char/tty_ldisc.c
index 874c248..a19e935 100644
--- a/drivers/char/tty_ldisc.c
+++ b/drivers/char/tty_ldisc.c
@@ -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);
}
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-06-15 15:19 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-15 15:32 [PATCH 0/2] Debug bits for the tty ldisc problem Alan Cox
2009-06-15 14:39 ` Peter Zijlstra
2009-06-15 15:14 ` Alan Cox
2009-06-15 15:19 ` Ingo Molnar
2009-06-15 15:32 ` [PATCH 1/2] ldisc: Make sure the ldisc isn't active when we close it Alan Cox
2009-06-15 15:32 ` [PATCH 2/2] ldisc: debug aids Alan Cox
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.