Message ID | 1245655421.4400.78.camel@concordia (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
> > [c00000003cf6ba70] [c00000000040a3d0] .tty_ldisc_put+0xa4/0xf4 (unreliable) > > [c00000003cf6bb10] [c00000000040a7c8] .tty_ldisc_reinit+0x38/0x80 > > [c00000003cf6bba0] [c00000000040b1d8] .tty_ldisc_hangup+0x190/0x260 > > [c00000003cf6bc40] [c000000000401090] .do_tty_hangup+0x188/0x4c0 > > [c00000003cf6bd20] [c000000000401440] .tty_vhangup_self+0x34/0x54 > > [c00000003cf6bdb0] [c00000000019236c] .sys_vhangup+0x38/0x58 > > [c00000003cf6be30] [c000000000008534] syscall_exit+0x0/0x40 > > Instruction dump: > > 912b0088 4bcd17bd 60000000 e87e8008 7f44d378 481c04fd 60000000 801b0008 > > 7c09fe70 7d200278 7c004850 54000ffe <0b000000> 7f63db78 4bd7c98d 60000000 > > Ah right, so this has check has just gone in, and the code in question > has been rewritten somewhat just recently. The check is to catch any cases where a line discipline is being freed up but has a refcount that is non zero. I think I know what is going on here. Alan
Alan Cox wrote: >>> [c00000003cf6ba70] [c00000000040a3d0] .tty_ldisc_put+0xa4/0xf4 (unreliable) >>> [c00000003cf6bb10] [c00000000040a7c8] .tty_ldisc_reinit+0x38/0x80 >>> [c00000003cf6bba0] [c00000000040b1d8] .tty_ldisc_hangup+0x190/0x260 >>> [c00000003cf6bc40] [c000000000401090] .do_tty_hangup+0x188/0x4c0 >>> [c00000003cf6bd20] [c000000000401440] .tty_vhangup_self+0x34/0x54 >>> [c00000003cf6bdb0] [c00000000019236c] .sys_vhangup+0x38/0x58 >>> [c00000003cf6be30] [c000000000008534] syscall_exit+0x0/0x40 >>> Instruction dump: >>> 912b0088 4bcd17bd 60000000 e87e8008 7f44d378 481c04fd 60000000 801b0008 >>> 7c09fe70 7d200278 7c004850 54000ffe <0b000000> 7f63db78 4bd7c98d 60000000 >>> >> Ah right, so this has check has just gone in, and the code in question >> has been rewritten somewhat just recently. >> > > The check is to catch any cases where a line discipline is being freed up > but has a refcount that is non zero. I think I know what is going on here. > This issue can be recreated with 2.6.31-rc2-git4 kernel (34f25476ace556263784ea2f8173e22b25557a13). Thanks -Sachin
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); }