mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
	Alan Cox <alan@linux.intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Jens Axboe <jaxboe@fusionio.com>
Subject: Re: [PATCH] tty: add lockdep annotations
Date: Sun, 3 Jun 2012 14:06:04 +0100	[thread overview]
Message-ID: <20120603140604.23b2a34b@pyramind.ukuu.org.uk> (raw)
In-Reply-To: <CA+55aFwPdYfu5p5EPqZLnzps0v0+MaL7=dr9cK71EqhAL-Hebg@mail.gmail.com>

> Actually, I think we could probably make it really trivial by forcing
> the free'ing of the tty itself to be RCU-delayed.

It doesn't solve the problem of the synchronization between ->ttys[] and
->termios[]. Thats two objects, and the root of the problem. Given the
size of struct ktermios it appears to be a win anyway to put it in the
tty.

At that point tty_release can do what it should do.

> What do you think?

Second complication is some ttys have their own private ->shutdown.

It's possibly a useful optimisation and way of doing it *once* the
termios tidy is done, but I think once that is done then ->shutdown goes
away or becomes an non IRQ path event in tty_release.

> Anyway, I'm closing the merge window now (doing the tagging, booting
> and checking that allmodconfig/allyesconfig/allnoconfigs all compile
> fine) so it's 3.6 material, but it doesn't sound bad.

I've been gradually putting in places the bits leading up to the tty_lock
fix. I hadn't realised that one needed to be ahead or was exposing the
termios/tty array race.

I'll just go back and put the termios stuff further ahead and get that
chunk right first. After that tty locking, and then we can worry about
the real nasty which is that if we fix the open/close paths for console
devices to be secure Fedora breaks because their userspace appears to be
completely broken in this area.

Alan

  reply	other threads:[~2012-06-03 13:02 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-30 12:54 [GIT PULL] Block driver bits for 3.5 Jens Axboe
2012-05-30 18:33 ` Eric Dumazet
2012-05-30 18:55   ` Jens Axboe
2012-05-30 19:08     ` Eric Dumazet
2012-05-30 19:17       ` Jens Axboe
2012-05-30 20:35       ` Eric Dumazet
2012-05-30 20:58         ` Linus Torvalds
2012-05-31  9:35         ` [PATCH] tty: add lockdep annotations Eric Dumazet
2012-05-31 11:45           ` Jiri Kosina
2012-05-31 11:59             ` Eric Dumazet
2012-06-01 18:17           ` Eric Dumazet
2012-06-01 18:51             ` Linus Torvalds
2012-06-01 20:38               ` Alan Cox
2012-06-01 20:46                 ` Eric Dumazet
2012-06-01 20:44               ` Eric Dumazet
2012-06-01 20:56                 ` Alan Cox
2012-06-01 20:59                   ` Eric Dumazet
2012-06-02  7:17                     ` Eric Dumazet
2012-06-02  7:55                       ` Eric Dumazet
2012-06-02  8:01                         ` Eric Dumazet
2012-06-02 11:57                           ` Alan Cox
2012-06-02 12:30                             ` Eric Dumazet
2012-06-02 18:38                               ` Linus Torvalds
2012-06-02 19:59                                 ` Linus Torvalds
2012-06-02 20:01                                   ` Linus Torvalds
2012-06-02 20:19                                   ` Alan Cox
2012-06-02 22:25                                     ` Linus Torvalds
2012-06-02 23:02                                       ` Alan Cox
2012-06-02 23:14                                         ` Linus Torvalds
2012-06-03  1:37                                       ` Linus Torvalds
2012-06-03 13:06                                         ` Alan Cox [this message]
2012-06-03 13:24                                         ` Alan Cox
2012-06-03 19:44                                       ` Eric Dumazet
2012-06-02 20:00                                 ` Alan Cox
2012-05-31 10:38         ` [PATCH] block: avoid infinite loop in get_task_io_context() Eric Dumazet
2012-05-31 10:47           ` Jens Axboe
2012-05-31 10:51             ` Eric Dumazet
2012-05-31 10:56               ` Jens Axboe
2012-06-01  5:06           ` 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=20120603140604.23b2a34b@pyramind.ukuu.org.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=alan@linux.intel.com \
    --cc=eric.dumazet@gmail.com \
    --cc=jaxboe@fusionio.com \
    --cc=linux-kernel@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®