[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130119000708.GA32591@kroah.com>
Date: Fri, 18 Jan 2013 16:07:08 -0800
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Ilya Zykov <ilya@...x.ru>
Cc: Alan Cox <alan@...rguk.ukuu.org.uk>,
Alan Cox <alan@...ux.intel.com>, linux-kernel@...r.kernel.org,
linux-serial@...r.kernel.org
Subject: Re: [PATCH] tty: Correct tty buffer flush.
On Wed, Jan 16, 2013 at 12:55:00PM +0400, Ilya Zykov wrote:
> 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.
This patch doesn't apply to my tty-next branch, can you redo it against
linux-next so that I can apply it?
thanks,
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists