On Thu, Jul 09, 2015 at 11:32:42PM +0200, Daniel Vetter wrote:
Since David Herrmann's mmap vma manager rework we don't need to grab dev->struct_mutex any more to prevent races when looking up the mmap offset. Drop it and instead don't forget to use the unref_unlocked variant (since the drm core still cares).
Aside: I stumbled over the mmap handler which directly does a dma_mmap_attrs. But totally fails to grab a reference on the underlying object and hence looks like it happily just leaks the ptes since there's no guarantee the mmap isn't still around when gem_free_object is called. Which the kerneldoc of dma_mmap_attrs explicitly forbids.
Same is true for Exynos, which seems to be the source for copy/paste here.
Anyway, for this change:
Reviewed-by: Thierry Reding treding@nvidia.com