mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 10:18:05 +02: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>
(cherry picked from commit e0030bc39f)
This commit is contained in:
parent
3cca717bc1
commit
1aba006c84
2 changed files with 3 additions and 1 deletions
|
|
@ -1633,7 +1633,7 @@
|
|||
"description": "zink: invalidate non-punted recycled descriptor sets that are not valid",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -836,6 +836,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…
Add table
Reference in a new issue