lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACvgo51EXugYmNamgUKzyaYbk_kEyODNbG10AJtkvhbQgYwxWw@mail.gmail.com>
Date:   Wed, 31 Oct 2018 09:38:56 +0000
From:   Emil Velikov <emil.l.velikov@...il.com>
To:     Robert Foss <robert.foss@...labora.com>
Cc:     David Airlie <airlied@...ux.ie>, Gerd Hoffmann <kraxel@...hat.com>,
        ML dri-devel <dri-devel@...ts.freedesktop.org>,
        "open list:VIRTIO GPU DRIVER" 
        <virtualization@...ts.linux-foundation.org>,
        "Linux-Kernel@...r. Kernel. Org" <linux-kernel@...r.kernel.org>,
        Rob Herring <robh@...nel.org>,
        Gustavo Padovan <gustavo.padovan@...labora.com>,
        Emil Velikov <emil.velikov@...labora.com>
Subject: Re: [PATCH 3/5] drm/virtio: add in-fences support for explicit synchronization

Hi Rob,

On Thu, 25 Oct 2018 at 19:38, Robert Foss <robert.foss@...labora.com> wrote:

> @@ -124,6 +127,22 @@ static int virtio_gpu_execbuffer_ioctl(struct drm_device *dev, void *data,
>         if ((exbuf->flags & ~VIRTGPU_EXECBUF_FLAGS))
>                 return -EINVAL;
>
> +       if (exbuf->flags & VIRTGPU_EXECBUF_FENCE_FD_IN) {
> +               in_fence = sync_file_get_fence(in_fence_fd);
> +               if (!in_fence)
> +                       return -EINVAL;
> +
> +               /*
> +                * Wait if the fence is from a foreign context, or if the fence
> +                * array contains any fence from a foreign context.
> +                */
> +               if (!dma_fence_match_context(in_fence, vgdev->fence_drv.context)) {
> +                       ret = dma_fence_wait(in_fence, true);
> +                       if (ret)
> +                               return ret;
Aren't we missing dma_fence_put() before the return here?

With that
Reviewed-by: Emil Velikov <emil.velikov@...labora.com>

-Emil

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ