Files
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
..
2025-07-10 14:55:18 -04:00
2025-09-16 21:48:37 +00:00
2025-09-15 22:46:21 +00:00
2025-08-08 10:10:58 +00:00
2025-09-16 17:36:58 +00:00
2025-06-05 18:57:42 +00:00