mesa/src/broadcom
Jason Ekstrand bae16fd795 v3dv/queue: Rework multisync_free
Thix fixes two bugs.  First, we stop leaking in/out fences with
multisync.  Because the in_syncs and out_syncs parameters to
set_multisync were arrays and not pointers to arrays, the caller's
in_syncs and out_syncs pointers never got set and remained NULL so
multisync_free() always sees to NULL pointers and does nothing, leaking
both arrays.  Not sure how this isn't showing up in the dEQP leak check
tests.

Second, the struct drm_v3d_multi_sync was in the scope of the then
clause of the `if (device->pdevice->caps.multisync)` so it goes out of
scope before the ioctl.  This is, effectively, a use-after-free and,
depending on stack allocation details, may result in the multisync
extension struct getting stompped before the ioctl.

Fixes: ff8586c345 ("v3dv: enable multiple semaphores on cl submission")
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15512>
(cherry picked from commit 688d478045)
2022-04-21 16:10:22 -07:00
..
ci ci/llvmpipe,softpipe: Switch piglit testing to piglit-runner. 2022-01-27 04:37:16 +00:00
cle broadcom: drop unused functions 2022-01-31 16:10:31 +00:00
clif v3d/clif: add support for dumping GS shader state 2021-10-13 21:23:10 +00:00
common v3dv: implement double-buffer mode 2022-01-14 10:57:26 +00:00
compiler broadcom/compiler: fix offset alignment for ldunifa when skipping 2022-02-03 10:32:01 -08:00
drm-shim vc4: add drm-shim 2021-01-28 16:14:06 +00:00
qpu broadcom: drop unused functions 2022-01-31 16:10:31 +00:00
simulator broadcom/simulator: handle DRM_V3D_PARAM_SUPPORTS_MULTISYNC_EXT 2022-01-24 11:34:00 +00:00
vulkan v3dv/queue: Rework multisync_free 2022-04-21 16:10:22 -07:00
.editorconfig broadcom: add editorconfig 2017-07-25 14:44:52 -07:00
meson.build broadcom: remove v3dv3 from neon library 2021-07-29 08:26:11 +00:00