qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 3/3] ui/console: add methods for allocating, intializing and


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 3/3] ui/console: add methods for allocating, intializing and accessing QemuDmaBuf
Date: Thu, 21 Mar 2024 10:58:18 +0100
User-agent: Mozilla Thunderbird

On 20/3/24 21:50, dongwon.kim@intel.com wrote:
From: Dongwon Kim <dongwon.kim@intel.com>

This commit introduces new methods within ui/console to handle the allocation,
initialization, and field retrieval of QemuDmaBuf. By isolating these
operations within ui/console, it enhances safety and encapsulation of
the struct.

Cc: Philippe Mathieu-Daudé <philmd@linaro.org>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Vivek Kasireddy <vivek.kasireddy@intel.com>
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
---
  include/ui/console.h | 10 ++++++++
  ui/console.c         | 55 ++++++++++++++++++++++++++++++++++++++++++++
  2 files changed, 65 insertions(+)


  void dpy_gl_release_dmabuf(QemuConsole *con,
                            QemuDmaBuf *dmabuf)
  {
@@ -1145,6 +1199,7 @@ void dpy_gl_release_dmabuf(QemuConsole *con,
          if (dcl->ops->dpy_gl_release_dmabuf) {
              dcl->ops->dpy_gl_release_dmabuf(dcl, dmabuf);
          }
+        g_free(dmabuf);

This makes vhost_user_gpu_handle_display() crash, see VhostUserGPU.

      }
  }




reply via email to

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