[PATCH] dma-buf/sync_file: Always increment refcount when merging fences.

Chris Wilson chris at chris-wilson.co.uk
Wed Sep 14 17:57:01 UTC 2016


On Wed, Sep 14, 2016 at 11:04:01AM -0300, Gustavo Padovan wrote:
> 2016-09-14 Chris Wilson <chris at chris-wilson.co.uk>:
> > I think there still seems to be a memory leak when calling
> > sync_file_set_fence() here with i == 1.
> 
> I think that is something we discussed already, we don't hold an extra
> ref there for i == 1 because it would leak the fence.

That's fine. I'm worried about the array we kmalloc here but
sync_file->fence = fences[0]. Where does the array go?

I *think* we need a if (i == 1) kfree(fences);
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the dri-devel mailing list