[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.01.0909290909280.6996@localhost.localdomain>
Date: Tue, 29 Sep 2009 09:23:31 -0700 (PDT)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: David Howells <dhowells@...hat.com>
cc: Alan Cox <alan@...rguk.ukuu.org.uk>, akpm@...ux-foundation.org,
gregkh@...e.de, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Remove pty_ops_bsd and pty_bsd_ioctl() as they're not
used
On Tue, 29 Sep 2009, David Howells wrote:
>
> Is it right to use pty_ops_bsd in _both_ places? Looking at the code in
> linux-2.6.0, the BSD ioctl only applies to the master and doesn't apply to the
> slave.
Right you are, good catch.
That said, I have to say that this whole pty lock thing seems to have been
broken since 2.6.26, and even now, nobody actually _complained_. You found
the problem due to a compiler warning rather than due to somebody noticing
that pty_bsd_ioctl() is no longer hooked up.
Because as far as I can tell, the bug was introduced by commit
3e8e88ca053150efdbecb45d8f481cf560ec808d ("pty: prepare for tty->ops
changes") back in April of 2008. That added the whole 'pty_ops_bsd'
structure, but it has never actually been used.
So I do wonder whether the right thing to do would not be to simple remove
the whole pty_ops_bsd code entirely. Or maybe mode the trivial TIOCSPTLCK
into the generic tty ioctl handling, and just make it test for
"driver->subtype == PTY_TYPE_MASTER" - and at least get rid of this subtle
thing that was broken for over a year without anybody noticing..
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists