Re: PATCH: tty locking for 2.6.9rc2

Alan Cox
2004-09-15T20:11:36Z

On Wed, Sep 15, 2004 at 01:54:42PM -0500, Paul Fulghum wrote:
> There are 6 places where this needs to be done:
> 3 in tty_set_ldisc
> 2 in release_dev
> 1 in initialize_tty_struct

Argh I thought I'd fixed that after I turned it into one refcount field
from two.

> Switching back to N_TTY ldisc in release_dev() of tty_io.c
> takes a global ldisc reference (tty_ldisc_get) but
> then frees the tty structure. This causes a reference
> leak (global ldisc refcount) on N_TTY because there
> is no corresponding tty_ldisc_put.

Thanks will look