amdgpu: fix vamgr_free_va logic
va+size will overflow if va equals to AMDGPU_INVALID_VA_ADDRESS, just return when hit that condition Signed-off-by: monk.liu <monk.liu@amd.com> Reviewed-by: Jammy Zhou <jammy.zhou@amd.com>main
parent
9066acf109
commit
d3e7195066
|
@ -113,6 +113,9 @@ void amdgpu_vamgr_free_va(struct amdgpu_bo_va_mgr *mgr, uint64_t va,
|
|||
{
|
||||
struct amdgpu_bo_va_hole *hole;
|
||||
|
||||
if (va == AMDGPU_INVALID_VA_ADDRESS)
|
||||
return;
|
||||
|
||||
size = ALIGN(size, mgr->va_alignment);
|
||||
|
||||
pthread_mutex_lock(&mgr->bo_va_mutex);
|
||||
|
|
Loading…
Reference in New Issue