mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2025-12-20 12:50:11 +01:00
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>
This commit is contained in:
parent
9066acf109
commit
d3e7195066
1 changed files with 3 additions and 0 deletions
|
|
@ -113,6 +113,9 @@ void amdgpu_vamgr_free_va(struct amdgpu_bo_va_mgr *mgr, uint64_t va,
|
||||||
{
|
{
|
||||||
struct amdgpu_bo_va_hole *hole;
|
struct amdgpu_bo_va_hole *hole;
|
||||||
|
|
||||||
|
if (va == AMDGPU_INVALID_VA_ADDRESS)
|
||||||
|
return;
|
||||||
|
|
||||||
size = ALIGN(size, mgr->va_alignment);
|
size = ALIGN(size, mgr->va_alignment);
|
||||||
|
|
||||||
pthread_mutex_lock(&mgr->bo_va_mutex);
|
pthread_mutex_lock(&mgr->bo_va_mutex);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue