public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jslaby@suse.cz>
To: Karel Zak <kzak@redhat.com>
Cc: gregkh@linuxfoundation.org, alan@linux.intel.com,
	jirislaby@gmail.com, linux-kernel@vger.kernel.org,
	Mauro Carvalho Chehab <mchehab@redhat.com>,
	Bryan Mason <bmason@redhat.com>
Subject: Re: [PATCH] TTY: do not reset master's packet mode
Date: Wed, 20 Feb 2013 17:40:34 +0100	[thread overview]
Message-ID: <5124FC82.5040305@suse.cz> (raw)
In-Reply-To: <20130220131903.GA8501@x2.net.home>

On 02/20/2013 02:19 PM, Karel Zak wrote:
> On Tue, Jan 15, 2013 at 11:26:22PM +0100, Jiri Slaby wrote:
>> Now that login from util-linux is forced to drop all references to a
>> TTY which it wants to hangup (to reach reference count 1) we are
>> seeing issues with telnet. When login closes its last reference to the
>> slave PTY, it also resets packet mode on the *master* side. And we
>> have a race here.
> 
> [...]
> 
>> By this I am resurrecting an old bug, see References. We are hitting
>> it regularly now, i.e. with updated util-linux, ergo login.
>>
>> Here, I am changing a behavior introduced back in 2.1 times. It would
>> better have a long time testing before goes upstream.
> 
>  It would be nice to found a quick way how to resolve this problem,
>  because telnet+login is broken now... and for end users it seems like
>  a regression.

Oh, the patch is in the TTY tree and I suppose it will go to 3.9-rc1
(and to stable as we will get to same later -rc -- to have some testing).

>  Maybe the requirement (patch) to close all references to TTY before
>  hangup should reverted or we can make an exception in login(1) code to
>  keep TTY open when login(1) is executed with -h (as used by telned).

If we reverted the patch in login, we would have to revert also a patch
in the TTY which closes a window allowing you to crash a kernel at will
(in fact that patch disallows multiple opens when hanging up a terminal.
IOW only the one to hang the terminal is allowed to have it opened.)

-- 
js
suse labs

  reply	other threads:[~2013-02-20 16:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-15 22:26 [PATCH] TTY: do not reset master's packet mode Jiri Slaby
2013-02-01 17:59 ` Josh Boyer
2013-02-04 15:55   ` Jiri Slaby
2013-02-20 13:19 ` Karel Zak
2013-02-20 16:40   ` Jiri Slaby [this message]
2013-02-20 17:32     ` Karel Zak

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=5124FC82.5040305@suse.cz \
    --to=jslaby@suse.cz \
    --cc=alan@linux.intel.com \
    --cc=bmason@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@gmail.com \
    --cc=kzak@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@redhat.com \
    /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