qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PULL 5/9] contrib: add vhost-user-gpu


From: Peter Maydell
Subject: Re: [Qemu-devel] [PULL 5/9] contrib: add vhost-user-gpu
Date: Thu, 30 May 2019 12:14:26 +0100

On Wed, 29 May 2019 at 05:42, Gerd Hoffmann <address@hidden> wrote:
>
> From: Marc-André Lureau <address@hidden>
>
> Add a vhost-user gpu backend, based on virtio-gpu/3d device. It is
> associated with a vhost-user-gpu device.
>
> Various TODO and nice to have items:
> - multi-head support
> - crash & resume handling
> - accelerated rendering/display that avoids the waiting round trips
> - edid support
>
> Signed-off-by: Marc-André Lureau <address@hidden>
> Message-id: address@hidden
> Signed-off-by: Gerd Hoffmann <address@hidden>

Hi; Coverity spotted an issue with this patch (CID 1401705):

> +int
> +main(int argc, char *argv[])
> +{


> +    if (opt_socket_path) {
> +        int lsock = unix_listen(opt_socket_path, &error_fatal);
> +        fd = accept(lsock, NULL, NULL);

Here we call unix_listen(), which can fail, but we don't check
for the error, so we can pass -1 to accept() as an fd, which is bogus.

> +        close(lsock);
> +    } else {
> +        fd = opt_fdnum;
> +    }

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]