summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/pch_uart.c
diff options
context:
space:
mode:
authorIlya Zykov <ilya@ilyx.ru>2013-01-19 14:16:20 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-20 23:50:36 (GMT)
commit64325a3be08d364a62ee8f84b2cf86934bc2544a (patch)
treed935c8754648b783eb0b83834f8d8c16d917eebd /drivers/tty/serial/pch_uart.c
parentf8a2b220afef7699f7a90d97dbc2d8830979874e (diff)
downloadlinux-fsl-qoriq-64325a3be08d364a62ee8f84b2cf86934bc2544a.tar.xz
tty: Correct tty buffer flush.
The root of problem is carelessly zeroing pointer(in function __tty_buffer_flush()), when another thread can use it. It can be cause of "NULL pointer dereference". Main idea of the patch, this is never free last (struct tty_buffer) in the active buffer. Only flush the data for ldisc(buf->head->read = buf->head->commit). At that moment driver can collect(write) data in buffer without conflict. It is repeat behavior of flush_to_ldisc(), only without feeding data to ldisc. Also revert: commit c56a00a165712fd73081f40044b1e64407bb1875 tty: hold lock across tty buffer finding and buffer filling In order to delete the unneeded locks any more. Signed-off-by: Ilya Zykov <ilya@ilyx.ru> CC: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/pch_uart.c')
0 files changed, 0 insertions, 0 deletions