All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alan Cox <alan@llwyncelyn.cymru>
To: Tejun Heo <tj@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org, kernel-team@fb.com
Subject: Re: [BUG] tty: Userland can create hung tasks
Date: Wed, 1 Nov 2017 17:09:08 +0000	[thread overview]
Message-ID: <20171101170908.6ad08580@alans-desktop> (raw)
In-Reply-To: <20171101020651.GK3252168@devbig577.frc2.facebook.com>

On Tue, 31 Oct 2017 19:06:51 -0700
Tejun Heo <tj@kernel.org> wrote:

> Hello,
> 
> tty hangup code doesn't mark the console as being HUPed for, e.g.,
> /dev/console and that can put the session leader trying to
> disassociate from the controlling terminal in an indefinite D sleep.
> 
> Looking at the code, I have no idea why some tty devices are never
> marked being hung up.  It *looks* intentional and dates back to the
> git origin but I couldn't find any clue.  The following patch is a
> workaround which fixes the observed problem but definitely isn't the
> proper fix.

Two reasons

1. It broke the serial consoles because they would hang up and close down
the hardware. With tty_port that *should* be fixable properly for any
cases remaining.

2. The console layer was (and still is) completely broken and doens't
refcount properly. So if you turn on console hangups it breaks (as indeed
does freeing consoles and half a dozen other things).

Sadly it seems that nobody cares about the console.

Alan

  reply	other threads:[~2017-11-01 17:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-01  2:06 [BUG] tty: Userland can create hung tasks Tejun Heo
2017-11-01 17:09 ` Alan Cox [this message]
2017-11-06 14:54   ` Tejun Heo

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=20171101170908.6ad08580@alans-desktop \
    --to=alan@llwyncelyn.cymru \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    --cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.