mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-26 20:50:23 +01:00
tu: Fix use-after-free in device destruction on old kernels
tu_bo_make_zombie() accesses the queue.
Fixes: f6c7f16322 ("tu: Implement VK_EXT_multisampled_render_to_single_sampled")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39113>
This commit is contained in:
parent
2e78d6edf1
commit
2878b86ccf
1 changed files with 5 additions and 5 deletions
|
|
@ -3183,6 +3183,11 @@ tu_DestroyDevice(VkDevice _device, const VkAllocationCallbacks *pAllocator)
|
|||
vk_free(&device->vk.alloc, device->trace_suballoc);
|
||||
}
|
||||
|
||||
if (device->msrtss_color_temporary)
|
||||
tu_destroy_memory(device, device->msrtss_color_temporary);
|
||||
if (device->msrtss_depth_temporary)
|
||||
tu_destroy_memory(device, device->msrtss_depth_temporary);
|
||||
|
||||
for (unsigned i = 0; i < TU_MAX_QUEUE_FAMILIES; i++) {
|
||||
for (unsigned q = 0; q < device->queue_count[i]; q++)
|
||||
tu_queue_finish(&device->queues[i][q]);
|
||||
|
|
@ -3190,11 +3195,6 @@ tu_DestroyDevice(VkDevice _device, const VkAllocationCallbacks *pAllocator)
|
|||
vk_free(&device->vk.alloc, device->queues[i]);
|
||||
}
|
||||
|
||||
if (device->msrtss_color_temporary)
|
||||
tu_destroy_memory(device, device->msrtss_color_temporary);
|
||||
if (device->msrtss_depth_temporary)
|
||||
tu_destroy_memory(device, device->msrtss_depth_temporary);
|
||||
|
||||
tu_drm_device_finish(device);
|
||||
|
||||
if (device->physical_device->has_set_iova)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue