Re: [PATCH] tty_buffer: avoid race due to tty_buffer_free_all() being misused

2013-05-17 Thread Peter Hurley
On 05/17/2013 02:29 AM, channing wrote: On Thu, 2013-05-16 at 08:54 -0400, Peter Hurley wrote: On 05/16/2013 04:59 AM, channing wrote: In tty_buffer.c, function tty_buffer_free_all() is used to remove all buffers for a tty, although it's declared that it mustn't be called when the tty is in us

Re: [PATCH] tty_buffer: avoid race due to tty_buffer_free_all() being misused

2013-05-16 Thread channing
On Thu, 2013-05-16 at 08:54 -0400, Peter Hurley wrote: > On 05/16/2013 04:59 AM, channing wrote: > > > > In tty_buffer.c, function tty_buffer_free_all() is used to remove > > all buffers for a tty, although it's declared that it mustn't be called > > when the tty is in use, it cannot guarantee that

Re: [PATCH] tty_buffer: avoid race due to tty_buffer_free_all() being misused

2013-05-16 Thread Greg Kroah-Hartman
On Thu, May 16, 2013 at 04:59:22PM +0800, channing wrote: > > In tty_buffer.c, function tty_buffer_free_all() is used to remove > all buffers for a tty, although it's declared that it mustn't be called > when the tty is in use, it cannot guarantee that. we can observe some > device driver make use

Re: [PATCH] tty_buffer: avoid race due to tty_buffer_free_all() being misused

2013-05-16 Thread Peter Hurley
On 05/16/2013 04:59 AM, channing wrote: In tty_buffer.c, function tty_buffer_free_all() is used to remove all buffers for a tty, although it's declared that it mustn't be called when the tty is in use, it cannot guarantee that. we can observe some device driver make use it by mistake, for exampl

[PATCH] tty_buffer: avoid race due to tty_buffer_free_all() being misused

2013-05-16 Thread channing
In tty_buffer.c, function tty_buffer_free_all() is used to remove all buffers for a tty, although it's declared that it mustn't be called when the tty is in use, it cannot guarantee that. we can observe some device driver make use it by mistake, for example, while tty device is releasing, the tty