Skip to contentSkip to conversation

drm/amdkfd: Fix resource leak in kriu rsetore queue

PATCH In review [email protected] 2 participants 2 messages Sep 6, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdkfd: Fix resource leak in kriu rsetore queue

From: "[email protected]" <[email protected]>

To avoid memory leaks, release q_extra_data when exiting the restore queue.

---
 drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c +1 -0
index 20ea745729ee..b439d4d0bd84 100644
@@ -1046,6 +1046,7 @@ int kfd_criu_restore_queue(struct kfd_process *p,
 		pr_debug("Queue id %d was restored successfully\n", queue_id);
 
 	kfree(q_data);
+	kfree(q_extra_data);
 
 	return ret;
 }
Signature · 1 line
2.25.1
#1 lore raw

Typo in patch subject: kriu -> criu

Alex

Quoted 25 lines · On Fri, Sep 6, 2024 at 2:03 AM <[email protected]> wrote:

From: "[email protected]" <[email protected]>

To avoid memory leaks, release q_extra_data when exiting the restore queue.

---
 drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c +1 -1
index 20ea745729ee..b439d4d0bd84 100644
@@ -1046,6 +1046,7 @@ int kfd_criu_restore_queue(struct kfd_process *p,
                pr_debug("Queue id %d was restored successfully\n", queue_id);
 
        kfree(q_data);
+       kfree(q_extra_data);
 
        return ret;
 }
--

2.25.1