From: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
To: Peter Hurley <peter@hurleysoftware.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
Jiri Slaby <jslaby@suse.cz>
Subject: Re: [PATCH -next 00/10] Fixes to controlling tty handling
Date: Wed, 22 Oct 2014 16:00:04 +0100 [thread overview]
Message-ID: <20141022160004.11be0850@alan.etchedpixels.co.uk> (raw)
In-Reply-To: <1413485990-16855-1-git-send-email-peter@hurleysoftware.com>
On Thu, 16 Oct 2014 14:59:40 -0400
Peter Hurley <peter@hurleysoftware.com> wrote:
> Hi Greg,
>
> This patch series:
> 1. removes stale code from the controlling tty handling functions
> 2. relocates the ctty functions to eliminate forward declarations
> 3. fixes several unsafe races when setting the controlling tty
> 4. eliminates holding tty_mutex as a necessary condition of
> setting the controlling terminal
>
> #4 is part of an overall effort to reduce the tty_mutex footprint.
>
> Unfortunately, this series does not fix two other race conditions:
> 1. disassociate_ctty()/no_tty() does not teardown the tty<->process
> associations atomically wrt job control, so it is possible to
> observe spurious error conditions from job control (tty_check_change()
> and job_control()). I'm looking into inverting the lock order of
> tty->ctrl_lock and tsk->sighand->siglock() to see if holding ctrl_lock
> is a suitable solution for atomic teardown. Especially now that
> ctrl_lock is not used for flow control anymore :)
> 2. task_pgrp() and task_session() are used unsafely. These fixes
> will be clearer after #1 is fixed.
Reviewed-by: Alan Cox <alan@linux.intel.com>
I can't prove entirely to my satisfaction that the claim in #9 is true in
the presence of simultaenous hangups opens and setsid but the locking
appears to be correct for the cases I was trying to figure out anyway.
Makes my head hurt just reviewing bits of this so thanks for doing all
this work !
prev parent reply other threads:[~2014-10-22 15:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-16 18:59 Peter Hurley
2014-10-16 18:59 ` [PATCH -next 01/10] tty: Remove tty_pair_get_tty()/tty_pair_get_pty() api Peter Hurley
2014-10-16 18:59 ` [PATCH -next 02/10] tty: Reorder proc_set_tty() and related fns Peter Hurley
2014-10-16 18:59 ` [PATCH -next 03/10] tty: Remove tsk parameter from proc_set_tty() Peter Hurley
2014-10-16 18:59 ` [PATCH -next 04/10] uml: Fix unsafe pid reference to foreground process group Peter Hurley
2014-10-17 7:57 ` Richard Weinberger
2014-10-16 18:59 ` [PATCH -next 05/10] tty: Replace open-coded tty_get_pgrp() Peter Hurley
2014-10-16 18:59 ` [PATCH -next 06/10] tty: Remove !tty condition from __proc_set_tty() Peter Hurley
2014-10-16 18:59 ` [PATCH -next 07/10] tty: Fix multiple races when setting the controlling terminal Peter Hurley
2014-10-16 18:59 ` [PATCH -next 08/10] tty: Move session_of_pgrp() and make static Peter Hurley
2014-10-16 18:59 ` [PATCH -next 09/10] tty: Serialize proc_set_tty() with tty_lock Peter Hurley
2014-10-16 18:59 ` [PATCH -next 10/10] tty: Update code comment in __proc_set_tty() Peter Hurley
2014-10-22 15:00 ` One Thousand Gnomes [this message]
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=20141022160004.11be0850@alan.etchedpixels.co.uk \
--to=gnomes@lxorguk.ukuu.org.uk \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=peter@hurleysoftware.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
Powered by JetHome