On 2026/08/25 19:20, Marc-André Lureau wrote:
Disable the GL scanout when the actively-displayed dmabuf is released,
so the console does not retain a stale reference.


Fixes: 239b7c5705a4 ("vfio/pci: close display console during unrealize, not finalize")

Because the VFIO commit changes to call qemu_console_gl_release_dmabuf() before qemu_graphic_console_close(), which dereferences the active scanout.

Regards,
Akihiko Odaki

Signed-off-by: Marc-André Lureau <[email protected]>
---
  ui/console.c | 3 +++
  1 file changed, 3 insertions(+)

diff --git a/ui/console.c b/ui/console.c
index a8a2a247d8f4..14f148118e37 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -1049,6 +1049,9 @@ void qemu_console_gl_release_dmabuf(QemuConsole *con,
              dcl->ops->dpy_gl_release_dmabuf(dcl, dmabuf);
          }
      }
+    if (con->scanout.kind == SCANOUT_DMABUF && dmabuf == con->scanout.dmabuf) {
+        qemu_console_gl_scanout_disable(con);
+    }
  }
void qemu_console_gl_update(QemuConsole *con,



Reply via email to