mesa/src/asahi
Mario Kleiner 3c01205e32 asahi: Fix lseek failure error handling in agx_bo_import().
If bo->size = lseek(); would return a failure value of bo->size ==-1,
then current error handling would return while leaving the already
allocated and cached bo for the dmabuf fd in a half initialized "zombie"
state. On a successive call to agx_bo_import() for the same fd, the
assigned bo->size == -1 would mark the bo as "already initialized",
just bumping its reference count, and then returning a dysfunctional
bo to the caller, leasing to followup failures elsewhere.

Use goto error; instead, where "error:" handling will zero-out the bo,
marking it as effectively uninitialized, and hopefully causing proper
initialization on a successive call to agx_bo_import().

Fixes: df725d4f64 ("asahi: remove agx_bo::dev")
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37538>
2025-09-24 15:14:42 +00:00
..
clc asahi/clc: promote bindless textures 2025-07-10 14:55:18 -04:00
compiler agx: use util_lut2 2025-09-16 21:48:37 +00:00
drm-shim asahi: fix drm-shim 2025-09-15 22:46:21 +00:00
genxml asahi: reduce ppp alignment 2025-08-08 10:10:58 +00:00
isa agx: fix simd reduce forcing no cache bit 2025-08-03 14:40:54 -04:00
layout build: avoid redefining unreachable() which is standard in C23 2025-07-31 17:49:42 +00:00
lib asahi: Fix lseek failure error handling in agx_bo_import(). 2025-09-24 15:14:42 +00:00
libagx nir, asahi: commonize interleave_agx 2025-09-16 18:26:12 +00:00
vulkan hk: Advertise VK_KHR_maintenance9 2025-09-16 17:36:58 +00:00
.clang-format clang-format: Update the .clang-format files to conformance clang-format json-schema 2025-09-09 07:04:55 +00:00
meson.build agx: add XML-based disassembler 2025-06-05 18:57:42 +00:00