[Intel-gfx] [PATCH v14 5/7] vfio: ABI for mdev display dma-buf operation

Gerd Hoffmann kraxel at redhat.com
Fri Sep 29 07:11:13 UTC 2017


  Hi,

> The reason why I want to propose the close IOCTL is because that the
> current lock (fb_obj_list_lock), cannot sync the intel_vgpu_fb_info
> releasing and reusing.
> You see, the intel_vgpu_fb_info reusing and releasing are in
> different threads. There is a case that intel_vgpu_find_dmabuf can
> return a intel_vgpu_fb_obj, while the intel_vgpu_fb_obj
> is on the way to be released. That's the problem.

Oh, right.  But that race is fixable.  We need to move the locks one
level up, so we don't only cover list operations (add/lookup/delete)
but also  the kref_{get,put} operations for the list elements.

Patch against my tree, only build-tested so far.

cheers,
  Gerd
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-fix-locking.patch
Type: text/x-patch
Size: 3707 bytes
Desc: 
URL: <https://lists.freedesktop.org/archives/intel-gfx/attachments/20170929/7ac7310d/attachment.bin>


More information about the Intel-gfx mailing list