From: Michael Tokarev <mjt@tls.msk.ru>
To: Eric Paris <eparis@redhat.com>
Cc: linux-kernel@vger.kernel.org, sgrubb@redhat.com,
esandeen@redhat.com, sukadev@us.ibm.com,
alan@lxorguk.ukuu.org.uk
Subject: Re: tty: tty_open can return to userspace holding tty_mutex
Date: Tue, 27 Jan 2009 00:19:38 +0300 [thread overview]
Message-ID: <497E28EA.8060504@msgid.tls.msk.ru> (raw)
In-Reply-To: <1233003761.9850.14.camel@localhost.localdomain>
Eric Paris wrote:
> __tty_open could return (to userspace) holding the tty_mutex thanks to a
> regression introduced by 4a2b5fddd53b80efcb3266ee36e23b8de28e761a. This was
> found by bisecting an fsfuzzer problem. Admittedly I have no idea how it
> managed to tickle this 100% reliably, but it is clearly a regression and
> when hit leaves the box in a completely unusable state. This patch lets
> the fsfuzzer test complete every time.
This should go to -stable too, right?
It's present in 2.6.28 (but not 2.6.27).
/mjt
> Signed-off-by: Eric Paris <eparis@redhat.com>
>
> ---
> drivers/char/tty_io.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
> index d33e5ab..bc84e12 100644
> --- a/drivers/char/tty_io.c
> +++ b/drivers/char/tty_io.c
> @@ -1817,8 +1817,10 @@ got_driver:
> /* check whether we're reopening an existing tty */
> tty = tty_driver_lookup_tty(driver, inode, index);
>
> - if (IS_ERR(tty))
> + if (IS_ERR(tty)) {
> + mutex_unlock(&tty_mutex);
> return PTR_ERR(tty);
> + }
> }
>
> if (tty) {
next prev parent reply other threads:[~2009-01-26 21:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-26 21:02 tty: tty_open can return to userspace holding tty_mutex Eric Paris
2009-01-26 21:16 ` Alan Cox
2009-01-26 21:19 ` Michael Tokarev [this message]
2009-01-26 21:47 ` Sukadev Bhattiprolu
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=497E28EA.8060504@msgid.tls.msk.ru \
--to=mjt@tls.msk.ru \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=eparis@redhat.com \
--cc=esandeen@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sgrubb@redhat.com \
--cc=sukadev@us.ibm.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