diff options
Diffstat (limited to 'drivers/char/selection.c')
-rw-r--r-- | drivers/char/selection.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/char/selection.c b/drivers/char/selection.c index f97b9e848064..6e79340d732f 100644 --- a/drivers/char/selection.c +++ b/drivers/char/selection.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/selection.h> | 26 | #include <linux/selection.h> |
27 | #include <linux/tiocl.h> | 27 | #include <linux/tiocl.h> |
28 | #include <linux/console.h> | 28 | #include <linux/console.h> |
29 | #include <linux/smp_lock.h> | ||
29 | 30 | ||
30 | /* Don't take this from <ctype.h>: 011-015 on the screen aren't spaces */ | 31 | /* Don't take this from <ctype.h>: 011-015 on the screen aren't spaces */ |
31 | #define isspace(c) ((c) == ' ') | 32 | #define isspace(c) ((c) == ' ') |
@@ -312,6 +313,8 @@ int paste_selection(struct tty_struct *tty) | |||
312 | struct tty_ldisc *ld; | 313 | struct tty_ldisc *ld; |
313 | DECLARE_WAITQUEUE(wait, current); | 314 | DECLARE_WAITQUEUE(wait, current); |
314 | 315 | ||
316 | lock_kernel(); | ||
317 | |||
315 | acquire_console_sem(); | 318 | acquire_console_sem(); |
316 | poke_blanked_console(); | 319 | poke_blanked_console(); |
317 | release_console_sem(); | 320 | release_console_sem(); |
@@ -335,5 +338,6 @@ int paste_selection(struct tty_struct *tty) | |||
335 | __set_current_state(TASK_RUNNING); | 338 | __set_current_state(TASK_RUNNING); |
336 | 339 | ||
337 | tty_ldisc_deref(ld); | 340 | tty_ldisc_deref(ld); |
341 | unlock_kernel(); | ||
338 | return 0; | 342 | return 0; |
339 | } | 343 | } |