mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 13:38:06 +02:00
panvk: fix a NULL pointer dereference in occlusion queries
If a meta operation (like a blit or clear) happens while occlusion queries are active, we temporarily disable the query. Unfortunately the code for this did not clear out the `syncobj` field. In rare combinations of circumstances this could cause an attempt to issue a write back of the occlusion query values, and since we've zeroed the `ptr` field it writes to a NULL value, causing a bus fault and device lost error. Fixes:61534faf4e("panvk: Wire occlusion queries to internals") Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36525> (cherry picked from commit24c692c981)
This commit is contained in:
parent
c2cbff8297
commit
e7d7d10d0a
2 changed files with 4 additions and 1 deletions
|
|
@ -6274,7 +6274,7 @@
|
|||
"description": "panvk: fix a NULL pointer dereference in occlusion queries",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "61534faf4e2b031b64ee387558a44e7e06915c48",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -112,6 +112,9 @@ panvk_per_arch(cmd_meta_gfx_start)(
|
|||
save_ctx->occlusion_query = cmdbuf->state.gfx.occlusion_query;
|
||||
|
||||
/* Ensure occlusion queries are disabled */
|
||||
#if PAN_ARCH >= 10
|
||||
cmdbuf->state.gfx.occlusion_query.syncobj = 0;
|
||||
#endif
|
||||
cmdbuf->state.gfx.occlusion_query.ptr = 0;
|
||||
cmdbuf->state.gfx.occlusion_query.mode = MALI_OCCLUSION_MODE_DISABLED;
|
||||
gfx_state_set_dirty(cmdbuf, OQ);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue