vc: Locking clean up
The virtual console layer uses the BKL for various things that don't really need it. Clean them out. Signed-off-by: Alan Cox <alan@linux.intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
d87d9b7d19
commit
e33ac1c10b
@@ -26,6 +26,7 @@
|
|||||||
#include <linux/selection.h>
|
#include <linux/selection.h>
|
||||||
#include <linux/tiocl.h>
|
#include <linux/tiocl.h>
|
||||||
#include <linux/console.h>
|
#include <linux/console.h>
|
||||||
|
#include <linux/smp_lock.h>
|
||||||
|
|
||||||
/* Don't take this from <ctype.h>: 011-015 on the screen aren't spaces */
|
/* Don't take this from <ctype.h>: 011-015 on the screen aren't spaces */
|
||||||
#define isspace(c) ((c) == ' ')
|
#define isspace(c) ((c) == ' ')
|
||||||
@@ -312,6 +313,8 @@ int paste_selection(struct tty_struct *tty)
|
|||||||
struct tty_ldisc *ld;
|
struct tty_ldisc *ld;
|
||||||
DECLARE_WAITQUEUE(wait, current);
|
DECLARE_WAITQUEUE(wait, current);
|
||||||
|
|
||||||
|
lock_kernel();
|
||||||
|
|
||||||
acquire_console_sem();
|
acquire_console_sem();
|
||||||
poke_blanked_console();
|
poke_blanked_console();
|
||||||
release_console_sem();
|
release_console_sem();
|
||||||
@@ -335,5 +338,6 @@ int paste_selection(struct tty_struct *tty)
|
|||||||
__set_current_state(TASK_RUNNING);
|
__set_current_state(TASK_RUNNING);
|
||||||
|
|
||||||
tty_ldisc_deref(ld);
|
tty_ldisc_deref(ld);
|
||||||
|
unlock_kernel();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@@ -287,8 +287,12 @@ static inline unsigned short *screenpos(struct vc_data *vc, int offset, int view
|
|||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Called from the keyboard irq path.. */
|
||||||
static inline void scrolldelta(int lines)
|
static inline void scrolldelta(int lines)
|
||||||
{
|
{
|
||||||
|
/* FIXME */
|
||||||
|
/* scrolldelta needs some kind of consistency lock, but the BKL was
|
||||||
|
and still is not protecting versus the scheduled back end */
|
||||||
scrollback_delta += lines;
|
scrollback_delta += lines;
|
||||||
schedule_console_callback();
|
schedule_console_callback();
|
||||||
}
|
}
|
||||||
@@ -2616,8 +2620,6 @@ int tioclinux(struct tty_struct *tty, unsigned long arg)
|
|||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
lock_kernel();
|
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case TIOCL_SETSEL:
|
case TIOCL_SETSEL:
|
||||||
@@ -2692,7 +2694,6 @@ int tioclinux(struct tty_struct *tty, unsigned long arg)
|
|||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
unlock_kernel();
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user