Skip to content

Commit

Permalink
viocons: BKL locking
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Apr 30, 2008
1 parent 1f8cabb commit dd9a451
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/char/viocons.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/*
Expand Down

0 comments on commit dd9a451

Please sign in to comment.