public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jslaby@suse.cz>
To: Kyle McMartin <kyle@mcmartin.ca>
Cc: gregkh@suse.de, akpm@linux-foundation.org,
	linux-kernel@vger.kernel.org, Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: [PATCH 1/1] TTY: don't allow reopen when ldisc is changing
Date: Sat, 27 Nov 2010 09:50:38 +0100	[thread overview]
Message-ID: <4CF0C65E.2010104@suse.cz> (raw)
In-Reply-To: <20101127025954.GA15818@bombadil.infradead.org>

On 11/27/2010 03:59 AM, Kyle McMartin wrote:
> I'm poking around to see, I think maybe something might be dropping
> locks in the callchain that gives us a window where this might be
> possible...

Of course, that's the case:
        clear_bit(TTY_LDISC, &tty->flags);
        tty_unlock();
        cancel_delayed_work_sync(&tty->buf.work);
        mutex_unlock(&tty->ldisc_mutex);

        tty_lock();
        mutex_lock(&tty->ldisc_mutex);

in tty_ldisc_hangup. Hence my point 1) from previous posts doesn't hold too:
1) __tty_hangup from tty_ldisc_hangup to tty_ldisc_enable. During this
section tty_lock is held.

I will check, how to fix this.

thanks,
-- 
js
suse labs

  reply	other threads:[~2010-11-27  8:50 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-24  0:13 mmotm 2010-11-23-16-12 uploaded akpm
2010-11-24  4:52 ` mmotm 2010-11-23 - lockdep whinge in e1000e driver Valdis.Kletnieks
2010-11-24  4:55 ` mmotm 2010-11-23 - WARNING: at drivers/tty/tty_io.c:1331 Valdis.Kletnieks
2010-11-25 15:14   ` Kyle McMartin
2010-11-25 16:44     ` Jiri Slaby
2010-11-25 16:51       ` Jiri Slaby
2010-11-25 17:16         ` [PATCH 1/1] TTY: don't allow reopen when ldisc is changing Jiri Slaby
2010-11-25 17:59           ` Kyle McMartin
2010-11-26  0:28           ` Kyle McMartin
2010-11-26  7:46             ` Jiri Slaby
2010-11-26 13:27               ` Kyle McMartin
2010-11-27  2:59               ` Kyle McMartin
2010-11-27  8:50                 ` Jiri Slaby [this message]
2010-11-27  9:43                   ` Jiri Slaby
2010-11-27 15:11                     ` Jiri Slaby
2010-11-27 23:53                       ` Kyle McMartin
2010-11-24  5:01 ` mmotm 2010-11-23 + autogroups -> inconsistent lock state Valdis.Kletnieks
2010-11-24 20:25   ` Mike Galbraith
2010-11-24 20:39     ` Mike Galbraith
2010-11-25  6:09     ` Valdis.Kletnieks
2010-12-02 18:16     ` Paul E. McKenney
2010-12-03  3:58       ` Mike Galbraith
2010-11-24 13:56 ` mmotm 2010-11-23-16-12 uploaded Zimny Lech
2010-11-24 18:51 ` mmotm 2010-11-23-16-12 uploaded (olpc) Randy Dunlap
2010-11-24 19:13   ` Andres Salomon
2010-11-26 16:46   ` Daniel Drake
2010-11-24 19:41 ` [PATCH -mmotm/-next] media: fix timblogiw kconfig & build error Randy Dunlap

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=4CF0C65E.2010104@suse.cz \
    --to=jslaby@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=gregkh@suse.de \
    --cc=kyle@mcmartin.ca \
    --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