From dd9a451aad4fd7d5f46d2300c0e4fb70d8914453 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Wed, 30 Apr 2008 00:53:25 -0700 Subject: viocons: BKL locking 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 Cc: Paul Mackerras Cc: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/char/viocons.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'drivers/char') diff --git a/drivers/char/viocons.c b/drivers/char/viocons.c index 8de6b95aeb8..9319c63dda9 100644 --- a/drivers/char/viocons.c +++ b/drivers/char/viocons.c @@ -704,8 +704,11 @@ static int viotty_ioctl(struct tty_struct *tty, struct file *file, 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; } /* -- cgit v1.2.3