Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu: caller should make sure not to double free

Remove the NULL check from amdgpu_hmm_range_free for hmm_pfns
as caller is responsible not to call amdgpu_hmm_range_free
more than once.

Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Sunil Khatri and committed by
Alex Deucher
c6526cc6 19727635

+1 -3
+1 -3
drivers/gpu/drm/amd/amdgpu/amdgpu_hmm.c
··· 287 287 if (!range) 288 288 return; 289 289 290 - if (range->hmm_range.hmm_pfns) 291 - kvfree(range->hmm_range.hmm_pfns); 292 - 290 + kvfree(range->hmm_range.hmm_pfns); 293 291 amdgpu_bo_unref(&range->bo); 294 292 kfree(range); 295 293 }