* kill-the-BKL/vt: Prevent holding the BKL on return to userspace
@ 2009-08-26 15:31 Henne
2009-08-26 15:51 ` Jonathan Corbet
0 siblings, 1 reply; 2+ messages in thread
From: Henne @ 2009-08-26 15:31 UTC (permalink / raw)
To: mingo; +Cc: corbet, Thomas Gleixner, linux-kernel
From: Henrik Kretzschmar <henne@nachtwindheim.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@nachtwindheim.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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: kill-the-BKL/vt: Prevent holding the BKL on return to userspace
2009-08-26 15:31 kill-the-BKL/vt: Prevent holding the BKL on return to userspace Henne
@ 2009-08-26 15:51 ` Jonathan Corbet
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Corbet @ 2009-08-26 15:51 UTC (permalink / raw)
To: Henne; +Cc: mingo, Thomas Gleixner, linux-kernel
On Wed, 26 Aug 2009 17:31:34 +0200
Henne <henne@nachtwindheim.de> wrote:
> case TIOCLINUX:
> - return tioclinux(tty, arg);
> + ret = tioclinux(tty, arg);
> + break;
> +
A quick check says that Jiri Slaby fixed this in commit
a115902f67ef51fbbe83e214fb761aaa9734c1ce back in June.
jon
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-08-26 15:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-26 15:31 kill-the-BKL/vt: Prevent holding the BKL on return to userspace Henne
2009-08-26 15:51 ` Jonathan Corbet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox