From: Greg Kroah-Hartman <gregkh@suse.de>
To: linux-kernel@vger.kernel.org
Cc: Alan Cox <alan@linux.intel.com>, stable <stable@kernel.org>,
Greg Kroah-Hartman <gregkh@suse.de>
Subject: [PATCH 2/3] tty: Fix unbalanced BKL handling in error path
Date: Thu, 13 May 2010 12:16:38 -0700 [thread overview]
Message-ID: <1273778199-17578-2-git-send-email-gregkh@suse.de> (raw)
In-Reply-To: <20100513191601.GA17538@kroah.com>
From: Alan Cox <alan@linux.intel.com>
Arnd noted:
After the "retry_open:" label, we first get the tty_mutex
and then the BKL. However a the end of tty_open, we jump
back to retry_open with the BKL still held. If we run into
this case, the tty_open function will be left with the BKL
still held.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/char/tty_io.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index 6da962c..d71f0fc 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -1875,6 +1875,7 @@ got_driver:
*/
if (filp->f_op == &hung_up_tty_fops)
filp->f_op = &tty_fops;
+ unlock_kernel();
goto retry_open;
}
unlock_kernel();
--
1.7.1
next prev parent reply other threads:[~2010-05-13 19:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-13 19:16 [GIT PATCH] TTY fixes for 2.6.34-git Greg KH
2010-05-13 19:16 ` [PATCH 1/3] serial: mpc52xx_uart: fix null pointer dereference Greg Kroah-Hartman
2010-05-13 19:16 ` Greg Kroah-Hartman [this message]
2010-05-13 19:16 ` [PATCH 3/3] serial: imx.c: fix CTS trigger level lower to avoid lost chars Greg Kroah-Hartman
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=1273778199-17578-2-git-send-email-gregkh@suse.de \
--to=gregkh@suse.de \
--cc=alan@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@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
Powered by JetHome