Skip to content

Commit

Permalink
vt_ioctl: fix lock imbalance
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Slaby authored and Linus Torvalds committed Jun 22, 2009
1 parent 69ae59d commit a115902
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/char/vt_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,8 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
kbd = kbd_table + console;
switch (cmd) {
case TIOCLINUX:
return tioclinux(tty, arg);
ret = tioclinux(tty, arg);
break;
case KIOCSOUND:
if (!perm)
goto eperm;
Expand Down

0 comments on commit a115902

Please sign in to comment.