From: Alan Cox Date: Wed, 30 Apr 2008 07:53:25 +0000 (-0700) Subject: viocons: BKL locking X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dd9a451aad4fd7d5f46d2300c0e4fb70d8914453;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Cc: Paul Mackerras Cc: Stephen Rothwell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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; } /*