diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2009-06-22 13:42:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-22 14:32:24 -0400 |
commit | a115902f67ef51fbbe83e214fb761aaa9734c1ce (patch) | |
tree | a12a81468795e40fe0012331cc4e95d13f5177e0 /drivers/char | |
parent | 69ae59d7d8df14413cf0a97b3e372d7dc8352563 (diff) |
vt_ioctl: fix lock imbalance
Don't return from switch/case directly in vt_ioctl. Set ret and break
instead so that we unlock BKL.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/vt_ioctl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c index e6ce632a393..7539bed0f7e 100644 --- a/drivers/char/vt_ioctl.c +++ b/drivers/char/vt_ioctl.c | |||
@@ -396,7 +396,8 @@ int vt_ioctl(struct tty_struct *tty, struct file * file, | |||
396 | kbd = kbd_table + console; | 396 | kbd = kbd_table + console; |
397 | switch (cmd) { | 397 | switch (cmd) { |
398 | case TIOCLINUX: | 398 | case TIOCLINUX: |
399 | return tioclinux(tty, arg); | 399 | ret = tioclinux(tty, arg); |
400 | break; | ||
400 | case KIOCSOUND: | 401 | case KIOCSOUND: |
401 | if (!perm) | 402 | if (!perm) |
402 | goto eperm; | 403 | goto eperm; |