lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 26 Aug 2009 17:31:34 +0200
From:	Henne <henne@...htwindheim.de>
To:	mingo@...e.hu
CC:	corbet@....net, Thomas Gleixner <tglx@...utronix.de>,
	linux-kernel@...r.kernel.org
Subject: kill-the-BKL/vt: Prevent holding the BKL on return to userspace

From: Henrik Kretzschmar <henne@...htwindheim.de>

kill-the-BKL/vt: Prevent holding the BKL on return to userspace

Returning from a function which holds the BLK isn't a good idea,
so we won't let it return from this point.
Instead we set the return variable and let the function return the
normal way without BKL held.

Signed-off-by: Henrik Kretzschmar <henne@...htwindheim.de>

---
This patch is only for the kill-the-BKL branch.

diff --git a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c
index 181ff38..b3da7b3 100644
--- a/drivers/char/vt_ioctl.c
+++ b/drivers/char/vt_ioctl.c
@@ -396,7 +396,9 @@ 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;


--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ