On 7/10/06, Theodore Tso <[email protected]> wrote:
On Mon, Jul 10, 2006 at 06:35:50PM -0400, Jon Smirl wrote:
> On 7/10/06, Alan Cox <[email protected]> wrote:
> >We hold file_list_lock because we have to find everyone using that tty
> >and hang up their instance of it, then flip the file operations not
> >because we need to protect against tty structs going away. It's needed
> >in order to walk the file list and protects against the file list itself
> >changing rather than the tty structs. It may well be possible to move
> >that to a tty layer private lock with care, but it would need care to
> >deal with VFS operations.
>
> Assuming do_SAK has blocked anyone's ability to newly open the tty,
> why does it need to search every file handle in the system instead of
> just using tty->tty_files? tty->tty_files should contain a list of
> everyone who has the tty open. Is this global search needed because of
> duplicated handles?
When I wrote the do_SAK code about 12-13 years ago, tty->tty_files
didn't exist. It should be safe to do this, but I'll echo Alan's
comment. We really ought to implement revoke(2) at the VFS layer, and
then utilize to implement SAK and vhangup() functionality.
I'll buy you lunch if you do it. My understanding of the subtleties is
barely enough for me to work on the tty layer.
- Ted
--
Jon Smirl
[email protected]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]