mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: David Howells <dhowells@redhat.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	akpm@linux-foundation.org, gregkh@suse.de,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Remove pty_ops_bsd and pty_bsd_ioctl() as they're not used
Date: Tue, 29 Sep 2009 09:23:31 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.2.01.0909290909280.6996@localhost.localdomain> (raw)
In-Reply-To: <395.1254239745@redhat.com>



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

  reply	other threads:[~2009-09-29 16:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-28 13:53 David Howells
2009-09-28 14:16 ` Alan Cox
2009-09-28 14:55   ` Linus Torvalds
2009-09-29 15:55   ` David Howells
2009-09-29 16:23     ` Linus Torvalds [this message]
2009-09-29 16:38       ` Linus Torvalds
2009-09-29 18:40       ` David Howells
2009-09-29 22:39         ` Alan Cox
2009-09-30 10:20     ` David Howells
2009-09-30 11:28       ` Alan Cox
2009-09-28 14:55 ` David Howells
2009-09-28 15:25   ` Alan Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.2.01.0909290909280.6996@localhost.localdomain \
    --to=torvalds@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=dhowells@redhat.com \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome