From 4aa33bce334050df81ec2e5c7a2aa1c73ad6df7f Mon Sep 17 00:00:00 2001 From: Christian Helmuth Date: Wed, 26 Mar 2025 16:24:15 +0100 Subject: [PATCH] vbox6: prevent deadlock in framebuffer implementation QuerySourceBitmap() may end up in a block for VM response, while the VM becomes blocked on the critsect in framebuffer. Fixes #5477 --- repos/ports/src/virtualbox6/include/fb.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/repos/ports/src/virtualbox6/include/fb.h b/repos/ports/src/virtualbox6/include/fb.h index a4050b346e..bd318721e3 100644 --- a/repos/ports/src/virtualbox6/include/fb.h +++ b/repos/ports/src/virtualbox6/include/fb.h @@ -138,11 +138,12 @@ class Genodefb : { HRESULT result = E_FAIL; - Lock(); /* save the new bitmap reference */ _display->QuerySourceBitmap(screen, _display_bitmap.asOutParam()); + Lock(); + bool const ok = (w <= (ULONG)_gui_win.area.w) && (h <= (ULONG)_gui_win.area.h);