tty: Fix race condition between __tty_buffer_request_room and flush_to_ldisc
[cascardo/linux.git] / include / linux / tty.h
index 1c3316a..036cccd 100644 (file)
@@ -61,6 +61,7 @@ struct tty_bufhead {
        struct tty_buffer *head;        /* Queue head */
        struct work_struct work;
        struct mutex       lock;
+       spinlock_t         flush_lock;
        atomic_t           priority;
        struct tty_buffer sentinel;
        struct llist_head free;         /* Free queue head */