[PATCH] drm/amd/amdkfd: fix possible memory leak in svm_range_restore_pages

2021-09-09 Thread Xiyu Yang
The memory leak issue may take place in an error handling path. When p->xnack_enabled is NULL, the function simply returns with -EFAULT and forgets to decrement the reference count of a kfd_process object bumped by kfd_lookup_process_by_pasid, which may incur memory leaks. Fix it by jumping to lab

Re: [PATCH] drm/amd/amdkfd: fix possible memory leak in svm_range_restore_pages

2021-09-08 Thread Felix Kuehling
Hi Xiyu Yang, This bug was already fixed by this commit: https://gitlab.freedesktop.org/agd5f/linux/-/commit/598a118db0d85a432f8cd541a6a5d31e31c56b6b Regards,  Felix Am 2021-09-09 um 12:27 a.m. schrieb Xiyu Yang: > The memory leak issue may take place in an error handling path. When > p->xnack_