diff options
Diffstat (limited to 'drivers/char/selection.c')
-rw-r--r-- | drivers/char/selection.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/char/selection.c b/drivers/char/selection.c index 85211a3a5811..75889cd9375f 100644 --- a/drivers/char/selection.c +++ b/drivers/char/selection.c | |||
@@ -319,8 +319,13 @@ int paste_selection(struct tty_struct *tty) | |||
319 | poke_blanked_console(); | 319 | poke_blanked_console(); |
320 | release_console_sem(); | 320 | release_console_sem(); |
321 | 321 | ||
322 | ld = tty_ldisc_ref_wait(tty); | 322 | ld = tty_ldisc_ref(tty); |
323 | 323 | if (!ld) { | |
324 | tty_unlock(); | ||
325 | ld = tty_ldisc_ref_wait(tty); | ||
326 | tty_lock(); | ||
327 | } | ||
328 | |||
324 | add_wait_queue(&vc->paste_wait, &wait); | 329 | add_wait_queue(&vc->paste_wait, &wait); |
325 | while (sel_buffer && sel_buffer_lth > pasted) { | 330 | while (sel_buffer && sel_buffer_lth > pasted) { |
326 | set_current_state(TASK_INTERRUPTIBLE); | 331 | set_current_state(TASK_INTERRUPTIBLE); |