[Intel-gfx] [PATCH 2/2] drm: prime: fix lookup of existing imports for self imported buffers

Imre Deak imre.deak at intel.com
Thu Apr 11 11:24:55 CEST 2013


On Wed, 2013-04-10 at 07:52 +1000, Dave Airlie wrote:
> > Since atm we don't take a reference on the dma buf pointer when we add
> > it to the import lookup table the dma buf can vanish leaving the stale
> > pointer behind. This can in turn lead to returning stale GEM handles
> > when userspace imports a newly exported buffer.
> 
> 
> I sent a bunch of patches to prime months ago, maybe go back and dig them out
> 
> they might fix some of these issues,
> 
> I think danvet bikeshedded my will to care at the time due to lack of
> proper locking,
> the fact is the patches didn't change the locking, but I could
> probably go back and find them.
> 
> Hopefully you haven't gone and reinvented that work.

Yes, I checked it with the i-g-t/prime_self_import test case and it's
passing with your

"drm/prime: keep a reference from the handle to exported dma-buf (v2.1)"

patch, so we can drop this one.

--Imre





More information about the Intel-gfx mailing list