diff options
author | Dennis Li <Dennis.Li@amd.com> | 2021-05-18 13:40:59 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2021-05-20 04:44:12 +0200 |
commit | 96b62c8aa47bdf063fbeff71460a4d199dd1431f (patch) | |
tree | 9bd345bad1d3e09cd1557f6dd03584a9019e0060 /drivers/gpu/drm/amd/amdkfd/kfd_events.c | |
parent | drm/amdgpu: Move dmabuf attach/detach to backend_(un)bind (diff) | |
download | linux-96b62c8aa47bdf063fbeff71460a4d199dd1431f.tar.xz linux-96b62c8aa47bdf063fbeff71460a4d199dd1431f.zip |
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 <Dennis.Li@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd/kfd_events.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_events.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); } |