Re: tty related lockdep trace during bootup on 3.2-rc2

From: Havard Skinnemoen
Date: Wed Nov 23 2011 - 12:58:12 EST


On Wed, Nov 23, 2011 at 2:12 AM, Jiri Slaby <jslaby@xxxxxxx> wrote:
> Oh, how it can be? You should vhangup the device on disconnect. Then you
> will be sure all close calls were performed before freeing the port.
> Then you can free the port, right?
>
> Like:
> * forbid further opens
> * tty_vhangup
> * stop the device
> * free the device state

Ok, interesting. It seems pretty different from what the driver is
currently doing. I'll see if I can figure out how to rework the
disconnect code.

I guess one remaining concern is that someone might still hold the
device open after hangup, so if we free the device state, which
includes the tty_port, something bad might happen, no?

> Also it looks like you have a leak in disconnect when there are users
> still. If I am looking correctly?

Funny you should say that. I'm also trying to investigate a case in
which the driver appears to leak tty devices, i.e. after a few days of
stress testing, /sys/class/tty is full of dangling ttyACMx symlinks
and new devices are ignored because acm_table is full.

Havard
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/