aboutsummaryrefslogtreecommitdiff
path: root/include/linux/tty_flip.h
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2013-06-15 09:36:15 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-23 16:47:10 -0700
commita7c8d58c79853adeebf0a1ddc9c63e433b4d97f1 (patch)
tree328d40837fb13c7856d3aae2be663093fa6278e0 /include/linux/tty_flip.h
parent47aa658a015440906def231f54685c4d5d49dc38 (diff)
downloadlinux-linaro-stable-a7c8d58c79853adeebf0a1ddc9c63e433b4d97f1.tar.gz
tty: Fix unsafe vt paste_selection()
Convert the tty_buffer_flush() exclusion mechanism to a public interface - tty_buffer_lock/unlock_exclusive() - and use the interface to safely write the paste selection to the line discipline. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/tty_flip.h')
-rw-r--r--include/linux/tty_flip.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/tty_flip.h b/include/linux/tty_flip.h
index 6944ed2ce692..21ddd7d9ea1f 100644
--- a/include/linux/tty_flip.h
+++ b/include/linux/tty_flip.h
@@ -32,4 +32,7 @@ static inline int tty_insert_flip_string(struct tty_port *port,
return tty_insert_flip_string_fixed_flag(port, chars, TTY_NORMAL, size);
}
+extern void tty_buffer_lock_exclusive(struct tty_port *port);
+extern void tty_buffer_unlock_exclusive(struct tty_port *port);
+
#endif /* _LINUX_TTY_FLIP_H */