mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 09:04:39 +02:00
drm/amdgpu: validate the bo from done list for NULL
Make sure the bo is valid before using it. Signed-off-by: Sunil Khatri <sunil.khatri@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
36ffc58b8a
commit
cd6250f3ae
|
|
@ -1062,6 +1062,8 @@ amdgpu_userq_vm_validate(struct amdgpu_userq_mgr *uq_mgr)
|
|||
/* Validate User Ptr BOs */
|
||||
list_for_each_entry(bo_va, &vm->done, base.vm_status) {
|
||||
bo = bo_va->base.bo;
|
||||
if (!bo)
|
||||
continue;
|
||||
|
||||
if (!amdgpu_ttm_tt_is_userptr(bo->tbo.ttm))
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user