Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1656333
| From | Gerd Hoffmann <kraxel@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v6 6/6] drm/i915/gvt: Adding interface so user space can get the dma-buf |
| Date | 2017-06-02 17:30 +0200 |
| Message-ID | <tNWGu-2XT-13@gated-at.bofh.it> (permalink) |
| References | (2 earlier) <tNCHM-61B-17@gated-at.bofh.it> <tNLrI-3yD-21@gated-at.bofh.it> <tNLBn-3BC-3@gated-at.bofh.it> <tNRdM-7Cl-19@gated-at.bofh.it> <tNWds-2wl-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi, > > When i915's dma-buf's release() callback is called it will try to > > free the gem object associated with the dma-buf if its ref count is > > 0. But in our case the ref count is 1 so no free callback is called > > so we can not release allocations there. Why the ref count is one? Who holds a reference and why? Maybe it should be the other way around, i.e. the dmabuf holds a reference on the vgpu instance backing it, i.e. you can't delete the vgpu while dma-bufs exist? > We cannot simply say that the user isn't allowed to release them in > that order. Yep, not going to fly. Can happen even unintentionally because we can pass around dmabufs to other processes. Example: qemu passes dmabuf to spice-client, then qemu crashes. mgmt fd is closed before dmabuf fd then. The kernel must be able to handle that. cheers, Gerd
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v6 6/6] drm/i915/gvt: Adding interface so user space can get the dma-buf Xiaoguang Chen <xiaoguang.chen@intel.com> - 2017-05-27 10:50 +0200
Re: [PATCH v6 6/6] drm/i915/gvt: Adding interface so user space can get the dma-buf Alex Williamson <alex.williamson@redhat.com> - 2017-06-01 20:10 +0200
RE: [PATCH v6 6/6] drm/i915/gvt: Adding interface so user space can get the dma-buf "Chen, Xiaoguang" <xiaoguang.chen@intel.com> - 2017-06-02 05:30 +0200
Re: [PATCH v6 6/6] drm/i915/gvt: Adding interface so user space can get the dma-buf Alex Williamson <alex.williamson@redhat.com> - 2017-06-02 05:40 +0200
RE: [PATCH v6 6/6] drm/i915/gvt: Adding interface so user space can get the dma-buf "Chen, Xiaoguang" <xiaoguang.chen@intel.com> - 2017-06-02 11:40 +0200
Re: [PATCH v6 6/6] drm/i915/gvt: Adding interface so user space can get the dma-buf Alex Williamson <alex.williamson@redhat.com> - 2017-06-02 17:00 +0200
Re: [PATCH v6 6/6] drm/i915/gvt: Adding interface so user space can get the dma-buf Gerd Hoffmann <kraxel@redhat.com> - 2017-06-02 17:30 +0200
RE: [PATCH v6 6/6] drm/i915/gvt: Adding interface so user space can get the dma-buf "Chen, Xiaoguang" <xiaoguang.chen@intel.com> - 2017-06-05 04:40 +0200
Re: [PATCH v6 6/6] drm/i915/gvt: Adding interface so user space can get the dma-buf Gerd Hoffmann <kraxel@redhat.com> - 2017-06-06 09:40 +0200
csiph-web