Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Alan Cox and committed by
Linus Torvalds
dd9a451a 1f8cabb7

+5 -2
+5 -2
drivers/char/viocons.c
··· 704 704 case KDSKBLED: 705 705 return 0; 706 706 } 707 - 708 - return n_tty_ioctl(tty, file, cmd, arg); 707 + /* FIXME: WTF is this being called for ??? */ 708 + lock_kernel(); 709 + ret = n_tty_ioctl(tty, file, cmd, arg); 710 + unlock_kernel(); 711 + return ret; 709 712 } 710 713 711 714 /*