libhsakmt: Fix queue destroy SVM path free size

Use q->total_mem_alloc_size for munmap in SVM codepath of free_queue.

Signed-off-by: Graham Sider <Graham.Sider@amd.com>
Change-Id: I2fecaa1ddb337b1fe71f9cbba45a0c9467eff0c0
This commit is contained in:
Graham Sider
2023-04-12 15:04:14 -04:00
rodzic a713fb766e
commit ae659e5427
+1 -2
Wyświetl plik
@@ -445,8 +445,7 @@ static void free_queue(struct queue *q)
q->eop_buffer_size,
PAGE_SIZE, q->use_ats);
if (q->unified_ctx_save_restore)
munmap(q->ctx_save_restore,
PAGE_ALIGN_UP(q->ctx_save_restore_size + q->debug_memory_size));
munmap(q->ctx_save_restore, q->total_mem_alloc_size);
else if (q->ctx_save_restore)
free_exec_aligned_memory(q->ctx_save_restore,
q->total_mem_alloc_size,