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>
This commit is contained in:
Alan Cox 2008-04-30 00:53:25 -07:00 committed by Linus Torvalds
parent 1f8cabb705
commit dd9a451aad

View 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;
}
/*