Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;