Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Sep 2006 23:09:22 +0200 (CEST)
From:      Martin Blapp <mb@imp.ch>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        cvs-src@FreeBSD.org, Martin Blapp <mbr@FreeBSD.org>, cvs-all@FreeBSD.org, src-committers@FreeBSD.org
Subject:   Re: cvs commit: src/sys/kern tty_pty.c
Message-ID:  <20060929230809.Q91466@godot.imp.ch>
In-Reply-To: <20060930044711.H96144@delplex.bde.org>
References:  <200609290952.k8T9qvcU053566@repoman.freebsd.org> <20060929202338.W91466@godot.imp.ch> <20060930044711.H96144@delplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help

Hi,

> I think I found the bug while looking for problems near vgonel().  We're
> nowhere near ready to free devices in in last-close, since vgonel() doesn't
> do anything to evict processes from device functions before it forces the
> device closed.  Drivers must be aware of the problem.  The tty driver
> already is.  See the comments about t_gen near tty_close() and ttysleep().
> t_gen must live across close so that any processes in device functions can
> check it after they wake up, and the tty and device data structures must
> live across last- close to hold t_gen and anything else needed for the
> device functions to return.  Sleeping device functions normally wake up
> after last-close returns.

So what can we do to destroy devices after last close ? Mark them with some
flag and handle this during device operations ?

Martin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060929230809.Q91466>