diff options
author | Alan Cox <alan@linux.intel.com> | 2012-03-02 14:59:37 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-03-08 11:10:27 -0800 |
commit | 20f62579dccc84428554b914e24a312a6554f841 (patch) | |
tree | bd6b0f2724d75ba7fd17bb6422bfa05505018474 /drivers/tty/vt/selection.c | |
parent | 4001d7b7fc271052ebff43f327c26dc64806bbdf (diff) | |
download | talos-op-linux-20f62579dccc84428554b914e24a312a6554f841.tar.gz talos-op-linux-20f62579dccc84428554b914e24a312a6554f841.zip |
vt: push down tioclinux cases
Some of this ventures into selection which is still a complete lost cause. We
are not making it any worse. It's completely busted anyway.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/vt/selection.c')
-rw-r--r-- | drivers/tty/vt/selection.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/tty/vt/selection.c b/drivers/tty/vt/selection.c index 738e45a35131..2a5091670927 100644 --- a/drivers/tty/vt/selection.c +++ b/drivers/tty/vt/selection.c @@ -75,7 +75,7 @@ clear_selection(void) { /* * User settable table: what characters are to be considered alphabetic? - * 256 bits + * 256 bits. FIXME: Needs a locking model. */ static u32 inwordLut[8]={ 0x00000000, /* control chars */ @@ -307,7 +307,8 @@ int set_selection(const struct tiocl_selection __user *sel, struct tty_struct *t * queue of the tty associated with the current console. * Invoked by ioctl(). * - * Locking: always called with BTM from vt_ioctl + * Locking: called without locks. Calls the ldisc wrongly with + * unsafe methods, */ int paste_selection(struct tty_struct *tty) { @@ -322,13 +323,12 @@ int paste_selection(struct tty_struct *tty) poke_blanked_console(); console_unlock(); + /* FIXME: wtf is this supposed to achieve ? */ ld = tty_ldisc_ref(tty); - if (!ld) { - tty_unlock(); + if (!ld) ld = tty_ldisc_ref_wait(tty); - tty_lock(); - } + /* FIXME: this is completely unsafe */ add_wait_queue(&vc->paste_wait, &wait); while (sel_buffer && sel_buffer_lth > pasted) { set_current_state(TASK_INTERRUPTIBLE); |