diff options
author | Alan Cox <alan@linux.intel.com> | 2010-05-04 20:42:36 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-26 14:32:07 -0700 |
commit | 90e2111a4feb6473082b723f83c6af730e06041a (patch) | |
tree | 7364d056531f5b68eed1e0f9037ea6a9f934de21 | |
parent | fea3cd8871c7f5868eed8422f276a958e3d5d0b6 (diff) | |
download | lwn-90e2111a4feb6473082b723f83c6af730e06041a.tar.gz lwn-90e2111a4feb6473082b723f83c6af730e06041a.zip |
tty: Fix unbalanced BKL handling in error path
commit 77945febbe60a69e9dcab7f49d33a1aa1e436973 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | 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 76253cf27028..9af676611759 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(); |