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 874c2486c0343ccc617072eb77059d51a8a58a6d..a19e935847b0a14e9740184e32d6e099efc26955 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);
 }