diff options
author | 2013-06-15 09:36:15 -0400 | |
---|---|---|
committer | 2013-07-23 16:47:10 -0700 | |
commit | a7c8d58c79853adeebf0a1ddc9c63e433b4d97f1 (patch) | |
tree | 328d40837fb13c7856d3aae2be663093fa6278e0 /include/linux/tty.h | |
parent | tty: Merge __tty_flush_buffer() into lone call site (diff) | |
download | linux-a7c8d58c79853adeebf0a1ddc9c63e433b4d97f1.tar.gz linux-a7c8d58c79853adeebf0a1ddc9c63e433b4d97f1.tar.bz2 linux-a7c8d58c79853adeebf0a1ddc9c63e433b4d97f1.zip |
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.h')
-rw-r--r-- | include/linux/tty.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/tty.h b/include/linux/tty.h index 991575fe3451..7a9a3b0a6b5a 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h @@ -67,8 +67,8 @@ static inline char *flag_buf_ptr(struct tty_buffer *b, int ofs) struct tty_bufhead { struct tty_buffer *head; /* Queue head */ struct work_struct work; - struct mutex flush_mutex; - unsigned int flushpending:1; + struct mutex lock; + atomic_t priority; struct tty_buffer sentinel; struct llist_head free; /* Free queue head */ atomic_t memory_used; /* In-use buffers excluding free list */ |