From: Eric Paris <eparis@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: sgrubb@redhat.com, esandeen@redhat.com, sukadev@us.ibm.com,
alan@lxorguk.ukuu.org.uk
Subject: tty: tty_open can return to userspace holding tty_mutex
Date: Mon, 26 Jan 2009 16:02:40 -0500 [thread overview]
Message-ID: <1233003761.9850.14.camel@localhost.localdomain> (raw)
__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.
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 reply other threads:[~2009-01-26 21:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-26 21:02 Eric Paris [this message]
2009-01-26 21:16 ` Alan Cox
2009-01-26 21:19 ` Michael Tokarev
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=1233003761.9850.14.camel@localhost.localdomain \
--to=eparis@redhat.com \
--cc=alan@lxorguk.ukuu.org.uk \
--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
Powered by JetHome