[Intel-gfx] [PATCH] dma-buf: make dma_fence structure a bit smaller

Daniel Vetter daniel at ffwll.ch
Wed Aug 7 21:11:48 UTC 2019


On Wed, Aug 07, 2019 at 03:01:59PM +0100, Chris Wilson wrote:
> Quoting Christian König (2019-08-07 14:54:05)
> > The ruc and cb_list are never used at the same time.
> > This smal change is actually making the structure 16% smaller.
> (Trivial pair of typos)
> 
> Yes. We clear the callback list on kref_put so that by the time we
> release the fence it is unused. No one should be adding to the cb_list
> that they don't themselves hold a reference for, this only now makes for
> a much more spectacular use-after-free. :)

^^ stuff the above as an inline kerneldoc comment into the patch? And into
the commit message too pls. We need better docs for all this scorcery :-)

Thanks, Daniel

> 
> > Signed-off-by: Christian König <christian.koenig at amd.com>
> Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
> -Chris
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the dri-devel mailing list