lkml.org 
[lkml]   [2015]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] tty: fix data race in tty_buffer_flush
On Tue, Sep 08, 2015 at 02:48:26PM +0200, Dmitry Vyukov wrote:
> tty_buffer_flush frees not acquired buffers.
> As the result, for example, read of b->size in tty_buffer_free
> can return garbage value which will lead to a huge buffer
> hanging in the freelist. This is just the benignest
> manifestation of freeing of a not acquired object.
> If the object is passed to kfree, heap can be corrupted.
>
> Acquire visibility over the buffer before freeing it.
>
> The data race was found with KernelThreadSanitizer (KTSAN).
>
> Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
> ---
> drivers/tty/tty_buffer.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)

What changed from the last version? Why should I take this one and not
the other? What order do these go in?

Please please please version your patches, and number them in a series
so that I know what to apply, and in what order, and what changed
between versions. Please read Documentation/SubmittingPatches for all
the details about this.

I've now dropped all of your patches from my queue, please resend them
all properly.

thanks,

greg k-h


\
 
 \ /
  Last update: 2015-09-09 00:21    [W:0.061 / U:1.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site