mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-12-12 19:54:33 +08:00
zink: invalidate non-punted recycled descriptor sets that are not valid
these sets may contain refs from the descriptors which need to be removed to avoid invalid memory access if the ref is leaked cc: mesa-stable Acked-by: Emma Anholt <emma@anholt.net> Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15226>
This commit is contained in:
parent
d63f3c31b7
commit
e0030bc39f
@ -818,6 +818,8 @@ zink_descriptor_set_get(struct zink_context *ctx,
|
||||
zds = (void*)he->data;
|
||||
*cache_hit = !zds->invalid;
|
||||
if (recycled) {
|
||||
if (zds->invalid)
|
||||
descriptor_set_invalidate(zds);
|
||||
/* need to migrate this entry back to the in-use hash */
|
||||
_mesa_hash_table_remove(pool->free_desc_sets, he);
|
||||
goto out;
|
||||
|
Loading…
Reference in New Issue
Block a user