mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 11:30:21 +01:00
venus: Fix zero-initialized fd causing apps to hang/crash
Some apps such as Gamescope crash under the mere presence of the virtio Vulkan driver without using a device.
This is because virtgpu::fd is zero-initialized upon allocation, which causes fd 0 to be closed in virtgpu_destroy.
Cc: mesa-stable
Fixes: 247232d5 ("venus: add experimental renderers")
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10814>
This commit is contained in:
parent
855cb78d46
commit
6fcf3314d0
1 changed files with 1 additions and 0 deletions
|
|
@ -1579,6 +1579,7 @@ vn_renderer_create_virtgpu(struct vn_instance *instance,
|
|||
return VK_ERROR_OUT_OF_HOST_MEMORY;
|
||||
|
||||
gpu->instance = instance;
|
||||
gpu->fd = -1;
|
||||
|
||||
VkResult result = virtgpu_init(gpu);
|
||||
if (result != VK_SUCCESS) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue