[PATCH] viocons: BKL locking

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Alan Cox
Date: Wednesday, February 20, 2008 - 1:32 pm

For some weird reason I can't ascertain (translation "I think its
broken") the viocons driver calls directly into the n_tty ldisc code even
if another ldisc is in use. It'll probably break if you do that but I'm
just fixing the locking and adding a comment that its horked.

Signed-off-by: Alan Cox <alan@redhat.com>

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.25-rc2-mm1/drivers/char/viocons.c linux-2.6.25-rc2-mm1/drivers/char/viocons.c
--- linux.vanilla-2.6.25-rc2-mm1/drivers/char/viocons.c	2008-02-19 11:01:44.000000000 +0000
+++ linux-2.6.25-rc2-mm1/drivers/char/viocons.c	2008-02-20 11:49:24.000000000 +0000
@@ -704,8 +704,11 @@
 	case KDSKBLED:
 		return 0;
 	}
-
-	return n_tty_ioctl(tty, file, cmd, arg);
+	/* FIXME: WTF is this being called for ??? */
+	lock_kernel();
+	ret =  n_tty_ioctl(tty, file, cmd, arg);
+	unlock_kernel();
+	return ret;
 }
 
 /*
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] viocons: BKL locking, Alan Cox, (Wed Feb 20, 1:32 pm)
Re: [PATCH] viocons: BKL locking, Paul Mackerras, (Wed Feb 20, 8:58 pm)
Re: [PATCH] viocons: BKL locking, Alan Cox, (Thu Feb 21, 3:50 am)
Re: [PATCH] viocons: BKL locking, Stephen Rothwell, (Thu Feb 21, 4:10 am)