mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-09 08:20:12 +01:00
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:
|
||
|---|---|---|
| .. | ||
| clc | ||
| compiler | ||
| drm-shim | ||
| genxml | ||
| isa | ||
| layout | ||
| lib | ||
| libagx | ||
| vulkan | ||
| .clang-format | ||
| meson.build | ||