]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
TTY: vt, fix paste_selection ldisc handling
authorJiri Slaby <jslaby@suse.cz>
Thu, 18 Oct 2012 20:26:32 +0000 (22:26 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 22 Oct 2012 23:50:53 +0000 (16:50 -0700)
commit7ee00fdb16418dd5078ec73e4a631c278a366501
tree5010d222fb5cc65c8f03d1e96bf2e25b130697f6
parentfa2ecfc5a68d85624bbd84f7d010860776b7e602
TTY: vt, fix paste_selection ldisc handling

There used to be a single tty_ldisc_ref_wait. But then, when a
big-tty-mutex (BTM) was introduced, it has to be tty_ldisc_ref +
tty_unlock + tty_ldisc_ref_wait + tty_lock. Later, BTM was removed
from that path and tty_ldisc_ref + tty_ldisc_ref_wait remained there.
But it makes no sense now. So leave there only tty_ldisc_ref_wait.

And when we have a reference to an ldisc, actually use it in the loop.
Otherwise it may be racy.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/vt/selection.c