]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
viocons: BKL locking
authorAlan Cox <alan@lxorguk.ukuu.org.uk>
Wed, 30 Apr 2008 07:53:25 +0000 (00:53 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 30 Apr 2008 15:29:40 +0000 (08:29 -0700)
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>
drivers/char/viocons.c

index 8de6b95aeb844cd03468d86f8643d2f65ed18acf..9319c63dda9a24443e0060ac32ce0a6fb6985205 100644 (file)
@@ -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;
 }
 
 /*