Re: [Xen-devel][PATCH 1/2] xen/gntdev: Do not destroy context while dma-bufs are in use

2019-02-17 Thread Juergen Gross
On 14/02/2019 15:23, Oleksandr Andrushchenko wrote: > From: Oleksandr Andrushchenko > > If there are exported DMA buffers which are still in use and > grant device is closed by either normal user-space close or by > a signal this leads to the grant device context to be destroyed, > thus making it

Re: [Xen-devel][PATCH 1/2] xen/gntdev: Do not destroy context while dma-bufs are in use

2019-02-15 Thread Juergen Gross
On 15/02/2019 16:35, Oleksandr Andrushchenko wrote: > On 2/15/19 5:28 PM, Boris Ostrovsky wrote: >> On 2/15/19 10:07 AM, Oleksandr Andrushchenko wrote: >>> On 2/15/19 5:03 PM, Boris Ostrovsky wrote: On 2/14/19 9:23 AM, Oleksandr Andrushchenko wrote: >      /* DMA buffer export support. */

Re: [Xen-devel][PATCH 1/2] xen/gntdev: Do not destroy context while dma-bufs are in use

2019-02-15 Thread Oleksandr Andrushchenko
On 2/15/19 5:28 PM, Boris Ostrovsky wrote: On 2/15/19 10:07 AM, Oleksandr Andrushchenko wrote: On 2/15/19 5:03 PM, Boris Ostrovsky wrote: On 2/14/19 9:23 AM, Oleksandr Andrushchenko wrote:     /* DMA buffer export support. */ @@ -311,6 +317,7 @@ static void dmabuf_exp_release(struct kref *kre

Re: [Xen-devel][PATCH 1/2] xen/gntdev: Do not destroy context while dma-bufs are in use

2019-02-15 Thread Boris Ostrovsky
On 2/15/19 10:07 AM, Oleksandr Andrushchenko wrote: > On 2/15/19 5:03 PM, Boris Ostrovsky wrote: >> On 2/14/19 9:23 AM, Oleksandr Andrushchenko wrote: >>>     /* DMA buffer export support. */ >>> @@ -311,6 +317,7 @@ static void dmabuf_exp_release(struct kref *kref) >>>     dmabuf_exp_wait_obj_s

Re: [Xen-devel][PATCH 1/2] xen/gntdev: Do not destroy context while dma-bufs are in use

2019-02-15 Thread Oleksandr Andrushchenko
On 2/15/19 5:03 PM, Boris Ostrovsky wrote: On 2/14/19 9:23 AM, Oleksandr Andrushchenko wrote: /* DMA buffer export support. */ @@ -311,6 +317,7 @@ static void dmabuf_exp_release(struct kref *kref) dmabuf_exp_wait_obj_signal(gntdev_dmabuf->priv, gntdev_dmabuf); list_del(&gntde

Re: [Xen-devel][PATCH 1/2] xen/gntdev: Do not destroy context while dma-bufs are in use

2019-02-15 Thread Boris Ostrovsky
On 2/14/19 9:23 AM, Oleksandr Andrushchenko wrote: > > /* DMA buffer export support. */ > @@ -311,6 +317,7 @@ static void dmabuf_exp_release(struct kref *kref) > > dmabuf_exp_wait_obj_signal(gntdev_dmabuf->priv, gntdev_dmabuf); > list_del(&gntdev_dmabuf->next); > + fput(gntdev_

[Xen-devel][PATCH 1/2] xen/gntdev: Do not destroy context while dma-bufs are in use

2019-02-14 Thread Oleksandr Andrushchenko
From: Oleksandr Andrushchenko If there are exported DMA buffers which are still in use and grant device is closed by either normal user-space close or by a signal this leads to the grant device context to be destroyed, thus making it not possible to correctly destroy those exported buffers when t