Skip to content
Commit c56a00a1 authored by Xiaobing Tu's avatar Xiaobing Tu Committed by Greg Kroah-Hartman
Browse files

tty: hold lock across tty buffer finding and buffer filling



tty_buffer_request_room is well protected, but while after it returns,
 it releases the port->lock. tty->buf.tail might be modified
by either irq handler or other threads. The patch adds more protection
by holding the lock across tty buffer finding and buffer filling.

Signed-off-by: default avatarAlek Du <alek.du@intel.com>
Signed-off-by: default avatarXiaobing Tu <xiaobing.tu@intel.com>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 871bdea6
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment