turnip: fix a use-after-free in autotune
authorChia-I Wu <olvaffe@gmail.com>
Fri, 12 Aug 2022 20:02:30 +0000 (13:02 -0700)
committerMarge Bot <emma+marge@anholt.net>
Mon, 15 Aug 2022 19:44:37 +0000 (19:44 +0000)
commitb8a916fd0cd589c621c6d1ed1c4b4fd01fd7bf5d
tree2af2ecf0f30dca6c445c2ca602935d738e98a55f
parent62b3e75e4c5acd9b776592ff9e3151fe0a9ae079
turnip: fix a use-after-free in autotune

When removing old histories, check against gpu fence.  Otherwise,
pending_results could have dangling pointers to the removed histories.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7055
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18040>
src/freedreno/vulkan/tu_autotune.c