From: Jiri Slaby Date: Mon, 22 Jun 2009 17:42:18 +0000 (+0100) Subject: vt_ioctl: fix lock imbalance X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a115902f67ef51fbbe83e214fb761aaa9734c1ce;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Alan Cox Cc: stable@kernel.org Signed-off-by: Linus Torvalds --- diff --git a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c index e6ce632a393e..7539bed0f7e0 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, kbd = kbd_table + console; switch (cmd) { case TIOCLINUX: - return tioclinux(tty, arg); + ret = tioclinux(tty, arg); + break; case KIOCSOUND: if (!perm) goto eperm;