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
[ROCm/ROCR-Runtime commit: ae659e5427]
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user