[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1253715222-6643-2-git-send-email-jirislaby@gmail.com>
Date: Wed, 23 Sep 2009 16:13:42 +0200
From: Jiri Slaby <jirislaby@...il.com>
To: gregkh@...e.de
Cc: akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
Jiri Slaby <jirislaby@...il.com>,
Alan Cox <alan@...ux.intel.com>
Subject: [PATCH 2/2] Char: vt_ioctl, fix BKL imbalance
Stanse found (again) a BKL imbalance in vt_ioctl.
It's easily triggerable by ioctl(dev_tty_fd, VT_SETACTIVATE, NULL);
Introduced by "vt: add an activate and lock".
Signed-off-by: Jiri Slaby <jirislaby@...il.com>
Cc: Alan Cox <alan@...ux.intel.com>
---
drivers/char/vt_ioctl.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c
index 29c651a..6b36ee5 100644
--- a/drivers/char/vt_ioctl.c
+++ b/drivers/char/vt_ioctl.c
@@ -981,8 +981,10 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
goto eperm;
if (copy_from_user(&vsa, (struct vt_setactivate __user *)arg,
- sizeof(struct vt_setactivate)))
- return -EFAULT;
+ sizeof(struct vt_setactivate))) {
+ ret = -EFAULT;
+ goto out;
+ }
if (vsa.console == 0 || vsa.console > MAX_NR_CONSOLES)
ret = -ENXIO;
else {
--
1.6.4.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists