[PATCH] drm/syncobj: Stop reusing the same struct file for all syncobj -> fd

Greg KH greg at kroah.com
Tue Mar 27 07:29:50 UTC 2018


On Mon, Mar 26, 2018 at 12:00:37PM -0700, Jason Ekstrand wrote:
> From: Chris Wilson <chris at chris-wilson.co.uk>
> 
> The vk cts test:
> dEQP-VK.api.external.semaphore.opaque_fd.export_multiple_times_temporary
> 
> triggers a lot of
> VFS: Close: file count is 0
> 
> Dave pointed out that clearing the syncobj->file from
> drm_syncobj_file_release() was sufficient to silence the test, but that
> opens a can of worm since we assumed that the syncobj->file was never
> unset. Stop trying to reuse the same struct file for every fd pointing
> to the drm_syncobj, and allocate one file for each fd instead.
> 
> v2: Fixup return handling of drm_syncobj_fd_to_handle
> v2.1: [airlied: fix possible syncobj ref race]
> v2.2: [jekstrand: back-port to 4.14]
> 
> Reported-by: Dave Airlie <airlied at redhat.com>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Tested-by: Dave Airlie <airlied at redhat.com>
> Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> Signed-off-by: Jason Ekstrand <jason at jlekstrand.net>
> Tested-by: Clayton Craft <clayton.a.craft at intel.com>
> ---
> 
> The back-port from 4.15 to 4.14 was non-trivial.  It'd be good if Chris and
> maybe Daniel could do a quick re-review.

Now queued up, thanks.

greg k-h


More information about the dri-devel mailing list