From: Jiri Slaby Date: Mon, 22 Jun 2009 17:42:18 +0000 (+0100) Subject: vt_ioctl: fix lock imbalance X-Git-Tag: v2.6.29.6~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a134c9a9e0be16e272e12ba4cac39e51c8359ddc;p=thirdparty%2Fkernel%2Fstable.git vt_ioctl: fix lock imbalance commit a115902f67ef51fbbe83e214fb761aaa9734c1ce upstream. 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 Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c index a2dee0eb6dadb..82d2449e7b477 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;