mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: fix resource leaks when cleaning up
In channel_free(), destroy notifier_wq and
semaphore_wq
In nvgpu_vm_remove(), destroy the update_gmmu_lock mutex
Bug 200647668
Change-Id: Icbb4e626c0fa9fa2dcf1430b3112b51829b00e4f
Signed-off-by: Peter Daifuku <pdaifuku@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2414820
(cherry picked from commit 4f66942afa)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2416311
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Alex Waterman
parent
b49c892f81
commit
a6e5c54882
@@ -1031,6 +1031,9 @@ unbind:
|
|||||||
ch->ref_actions_put = 0;
|
ch->ref_actions_put = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
nvgpu_cond_destroy(&ch->notifier_wq);
|
||||||
|
nvgpu_cond_destroy(&ch->semaphore_wq);
|
||||||
|
|
||||||
/* make sure we catch accesses of unopened channels in case
|
/* make sure we catch accesses of unopened channels in case
|
||||||
* there's non-refcounted channel pointers hanging around */
|
* there's non-refcounted channel pointers hanging around */
|
||||||
ch->g = NULL;
|
ch->g = NULL;
|
||||||
|
|||||||
@@ -994,6 +994,7 @@ static void nvgpu_vm_remove(struct vm_gk20a *vm)
|
|||||||
}
|
}
|
||||||
|
|
||||||
nvgpu_mutex_release(&vm->update_gmmu_lock);
|
nvgpu_mutex_release(&vm->update_gmmu_lock);
|
||||||
|
nvgpu_mutex_destroy(&vm->update_gmmu_lock);
|
||||||
|
|
||||||
nvgpu_mutex_destroy(&vm->syncpt_ro_map_lock);
|
nvgpu_mutex_destroy(&vm->syncpt_ro_map_lock);
|
||||||
nvgpu_kfree(g, vm);
|
nvgpu_kfree(g, vm);
|
||||||
|
|||||||
Reference in New Issue
Block a user