From 96b62c8aa47bdf063fbeff71460a4d199dd1431f Mon Sep 17 00:00:00 2001 From: Dennis Li Date: Tue, 18 May 2021 19:40:59 +0800 Subject: [PATCH] drm/amdkfd: fix a resource leakage issue 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 Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdkfd/kfd_events.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_events.c b/drivers/gpu/drm/amd/amdkfd/kfd_events.c index 4d210f23c33c..3eea4edee355 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_events.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_events.c @@ -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); } -- 2.11.0