mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oleksandr Andrushchenko <andr2000@gmail.com>
To: Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org,
	jgross@suse.com
Cc: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Subject: Re: [Xen-devel][PATCH 1/2] xen/gntdev: Do not destroy context while dma-bufs are in use
Date: Fri, 15 Feb 2019 17:35:35 +0200	[thread overview]
Message-ID: <6e9f502c-3d60-32fb-d737-b016cfa5a7f1@gmail.com> (raw)
In-Reply-To: <eddff494-8cc7-f796-156e-e2e9e3d2daae@oracle.com>

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 *kref)
>>>>          dmabuf_exp_wait_obj_signal(gntdev_dmabuf->priv, gntdev_dmabuf);
>>>>        list_del(&gntdev_dmabuf->next);
>>>> +    fput(gntdev_dmabuf->priv->filp);
>>>>        kfree(gntdev_dmabuf);
>>>>    }
>>>>    @@ -423,6 +430,7 @@ static int dmabuf_exp_from_pages(struct
>>>> gntdev_dmabuf_export_args *args)
>>>>        mutex_lock(&args->dmabuf_priv->lock);
>>>>        list_add(&gntdev_dmabuf->next, &args->dmabuf_priv->exp_list);
>>>>        mutex_unlock(&args->dmabuf_priv->lock);
>>>> +    get_file(gntdev_dmabuf->priv->filp);
>>> Not fget()?
>> fget wants file descriptor [1] and returns struct file *,
>> but we already have struct file*, so I use get_file [2]
>> which does what I need - increments the reference counter
>> on the file
>
> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Thank you,
any chance we can get this for 5.1?

  reply	other threads:[~2019-02-15 15:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-14 14:23 Oleksandr Andrushchenko
2019-02-14 14:23 ` [Xen-devel][PATCH 2/2] xen/gntdev: Check and release imported dma-bufs on close Oleksandr Andrushchenko
2019-02-15 15:06   ` Boris Ostrovsky
2019-02-17 10:40   ` Juergen Gross
2019-02-15 15:03 ` [Xen-devel][PATCH 1/2] xen/gntdev: Do not destroy context while dma-bufs are in use Boris Ostrovsky
2019-02-15 15:07   ` Oleksandr Andrushchenko
2019-02-15 15:28     ` Boris Ostrovsky
2019-02-15 15:35       ` Oleksandr Andrushchenko [this message]
2019-02-15 16:29         ` Juergen Gross
2019-02-17 10:39 ` Juergen Gross

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6e9f502c-3d60-32fb-d737-b016cfa5a7f1@gmail.com \
    --to=andr2000@gmail.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleksandr_andrushchenko@epam.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®