summaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2008-04-30 09:53:25 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-30 17:29:40 +0200
commitdd9a451aad4fd7d5f46d2300c0e4fb70d8914453 (patch)
tree1340cdb2e4ae943af536957d418f5fd5424d0dae /drivers/char
parentsynclink series: Prepare for BKL pushdown (diff)
downloadlinux-dd9a451aad4fd7d5f46d2300c0e4fb70d8914453.tar.xz
linux-dd9a451aad4fd7d5f46d2300c0e4fb70d8914453.zip
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 <alan@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/viocons.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/char/viocons.c b/drivers/char/viocons.c
index 8de6b95aeb84..9319c63dda9a 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;
}
/*