]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdkfd: fix double free mem structure
authorPhilip Yang <Philip.Yang@amd.com>
Fri, 26 Nov 2021 23:43:09 +0000 (18:43 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 1 Dec 2021 22:08:00 +0000 (17:08 -0500)
commit764117a7e1b0a3b93db3c822e39f0ce893e5aa16
treea3c075ca426414b74f56dfb3cd93503a6cae565d
parentfc232f7328082afb7464b1e711d438996a63331e
drm/amdkfd: fix double free mem structure

drm_gem_object_put calls release_notify callback to free the mem
structure and unreserve_mem_limit, move it down after the last access
of mem and make it conditional call.

Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c