Commit a115902f authored by Jiri Slaby's avatar Jiri Slaby Committed by Linus Torvalds

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: default avatarJiri Slaby <jirislaby@gmail.com>
Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Cc: stable@kernel.org
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 69ae59d7
...@@ -396,7 +396,8 @@ int vt_ioctl(struct tty_struct *tty, struct file * file, ...@@ -396,7 +396,8 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
kbd = kbd_table + console; kbd = kbd_table + console;
switch (cmd) { switch (cmd) {
case TIOCLINUX: case TIOCLINUX:
return tioclinux(tty, arg); ret = tioclinux(tty, arg);
break;
case KIOCSOUND: case KIOCSOUND:
if (!perm) if (!perm)
goto eperm; goto eperm;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment