Messages in this thread | | | Date | Tue, 8 Sep 2015 15:11:23 -0700 | From | Greg KH <> | Subject | Re: [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
| |