we need to unreserve the bo's too during clean up along with freeing the memory of context.
Fixes: c549912cd8 (drm/amdkfd: add missing return value check for range) Signed-off-by: Sunil Khatri <[email protected]> --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c index 7f0ab73e2396..1b8d284dd15d 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_svm.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_svm.c @@ -1740,6 +1740,7 @@ static int svm_range_validate_and_map(struct mm_struct *mm, range = amdgpu_hmm_range_alloc(NULL); if (unlikely(!range)) { r = -ENOMEM; + svm_range_unreserve_bos(ctx); goto free_ctx; } -- 2.34.1
