ldisc: debug aids
authorAlan Cox <alan@linux.intel.com>
Tue, 16 Jun 2009 16:00:53 +0000 (17:00 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 16 Jun 2009 19:01:16 +0000 (12:01 -0700)
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/tty_ldisc.c

index 874c248..a19e935 100644 (file)
@@ -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);
 }