aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/vt.c
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2008-04-30 03:53:29 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-30 11:29:40 -0400
commit04f378b198da233ca0aca341b113dc6579d46123 (patch)
tree696e7bd401125cee71ecaa2047c4273f38732554 /drivers/char/vt.c
parente52384426064bca0669a954736206adca7595d48 (diff)
tty: BKL pushdown
- Push the BKL down into the line disciplines - Switch the tty layer to unlocked_ioctl - Introduce a new ctrl_lock spin lock for the control bits - Eliminate much of the lock_kernel use in n_tty - Prepare to (but don't yet) call the drivers with the lock dropped on the paths that historically held the lock BKL now primarily protects open/close/ldisc change in the tty layer [jirislaby@gmail.com: a couple of fixes] Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/vt.c')
-rw-r--r--drivers/char/vt.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/char/vt.c b/drivers/char/vt.c
index 1c2660477135..e64f0bf3624e 100644
--- a/drivers/char/vt.c
+++ b/drivers/char/vt.c
@@ -2541,6 +2541,9 @@ int tioclinux(struct tty_struct *tty, unsigned long arg)
2541 if (get_user(type, p)) 2541 if (get_user(type, p))
2542 return -EFAULT; 2542 return -EFAULT;
2543 ret = 0; 2543 ret = 0;
2544
2545 lock_kernel();
2546
2544 switch (type) 2547 switch (type)
2545 { 2548 {
2546 case TIOCL_SETSEL: 2549 case TIOCL_SETSEL:
@@ -2560,7 +2563,7 @@ int tioclinux(struct tty_struct *tty, unsigned long arg)
2560 ret = sel_loadlut(p); 2563 ret = sel_loadlut(p);
2561 break; 2564 break;
2562 case TIOCL_GETSHIFTSTATE: 2565 case TIOCL_GETSHIFTSTATE:
2563 2566
2564 /* 2567 /*
2565 * Make it possible to react to Shift+Mousebutton. 2568 * Make it possible to react to Shift+Mousebutton.
2566 * Note that 'shift_state' is an undocumented 2569 * Note that 'shift_state' is an undocumented
@@ -2615,6 +2618,7 @@ int tioclinux(struct tty_struct *tty, unsigned long arg)
2615 ret = -EINVAL; 2618 ret = -EINVAL;
2616 break; 2619 break;
2617 } 2620 }
2621 unlock_kernel();
2618 return ret; 2622 return ret;
2619} 2623}
2620 2624
@@ -3829,7 +3833,7 @@ static int con_font_get(struct vc_data *vc, struct console_font_op *op)
3829 goto out; 3833 goto out;
3830 3834
3831 c = (font.width+7)/8 * 32 * font.charcount; 3835 c = (font.width+7)/8 * 32 * font.charcount;
3832 3836
3833 if (op->data && font.charcount > op->charcount) 3837 if (op->data && font.charcount > op->charcount)
3834 rc = -ENOSPC; 3838 rc = -ENOSPC;
3835 if (!(op->flags & KD_FONT_FLAG_OLD)) { 3839 if (!(op->flags & KD_FONT_FLAG_OLD)) {