Commit cdb36c23 authored by Ajay Dudani's avatar Ajay Dudani Committed by Android Partner Code Review
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>
Signed-off-by: default avatarAjay Dudani <adudani@codeaurora.org>
parent 4d4198aa
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment