Skip to contentSkip to conversation

drm/amdkfd: Fix resource leak in riu rsetore queue

PATCH In review [email protected] 4 participants 4 messages Sep 9, 2024

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

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

To avoid memory leaks, release q_extra_data when exiting the restore queue.
v2: Correct the proto (Alex)

---
 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
Reviewed-by on v1 1/1
#1 lore raw

[Public]

This patch is,

Quoted 32 lines

-----Original Message-----
From: [email protected] <[email protected]>
Sent: Monday, September 9, 2024 9:21 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; Huang, Tim <[email protected]>; Zhang, Jesse(Jie) <[email protected]>
Subject: [PATCH] drm/amdkfd: Fix resource leak in riu rsetore queue

To avoid memory leaks, release q_extra_data when exiting the restore queue.
v2: Correct the proto (Alex)

---
 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

#2 lore raw
In reply to [email protected]
Quoted 3 lines · On Sun, Sep 8, 2024 at 9:20 PM [email protected] <[email protected]> wrote:

To avoid memory leaks, release q_extra_data when exiting the restore queue.
v2: Correct the proto (Alex)

should be criu, not riu.

Alex

Quoted 21 lines
---
 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

#3 lore raw

[AMD Official Use Only - AMD Internal Distribution Only]

Should also probably fix

rsetore -> restore

as well

Kent

Quoted 42 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Monday, September 9, 2024 1:56 PM
To: Zhang, Jesse(Jie) <[email protected]>
Cc: [email protected]; Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; Huang, Tim <[email protected]>
Subject: Re: [PATCH] drm/amdkfd: Fix resource leak in riu rsetore queue

Quoted 3 lines · On Sun, Sep 8, 2024 at 9:20 PM [email protected] <[email protected]> wrote:

To avoid memory leaks, release q_extra_data when exiting the restore queue.
v2: Correct the proto (Alex)

should be criu, not riu.

Alex

Review

Quoted 7 lines
---
 drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 1 +
 1 file changed, 1 insertion(+)
(quoted diff) +0 -0

b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c

Quoted 14 lines

index 20ea745729ee..b439d4d0bd84 100644

drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c +1 -1
@@ -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