]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amdkfd: fix a resource leakage issue
authorDennis Li <Dennis.Li@amd.com>
Tue, 18 May 2021 11:40:59 +0000 (19:40 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 20 May 2021 02:44:12 +0000 (22:44 -0400)
The function kfd_lookup_process_by_pasid will increase the reference
count of kfd_process object, its caller should call kfd_unref_process to
decrease the reference count. Otherwise resource leakage will happen.

Signed-off-by: Dennis Li <Dennis.Li@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_events.c

index 4d210f23c33cbf0b6b8bbb79ee4df9e634d66bf5..3eea4edee355da838cddbd8eb8a69a41320a73cb 100644 (file)
@@ -1088,4 +1088,6 @@ void kfd_signal_poison_consumed_event(struct kfd_dev *dev, u32 pasid)
 
        /* user application will handle SIGBUS signal */
        send_sig(SIGBUS, p->lead_thread, 0);
+
+       kfd_unref_process(p);
 }