[PATCH] drm/amdgpu: fix list not initialized

Christian König ckoenig.leichtzumerken at gmail.com
Wed Apr 18 11:17:06 UTC 2018


Am 18.04.2018 um 12:37 schrieb Chunming Zhou:
> Otherwise, cpu stuck for 22s with kernel panic.
>
> Change-Id: I5b87cde662a4658c9ab253ba88d009c9628a44ca
> Signed-off-by: Chunming Zhou <david1.zhou at amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index f0fbc331aa30..7131ad13c5b5 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -1563,10 +1563,9 @@ int amdgpu_vm_bo_update(struct amdgpu_device *adev,
>   		 * the evicted list so that it gets validated again on the
>   		 * next command submission.
>   		 */
> +		list_del_init(&bo_va->base.vm_status);
>   		if (!(bo->preferred_domains & amdgpu_mem_type_to_domain(mem_type)))
>   			list_add_tail(&bo_va->base.vm_status, &vm->evicted);
> -		else
> -			list_del_init(&bo_va->base.vm_status);

Good catch, but I think I would prefer to replace list_add_tail() with 
list_move_tail() instead of moving the list_del_init().

But just a nit pick. Either way the patch is Reviewed-by: Christian 
König <christian.koenig at amd.com>.

Regards,
Christian.

>   	} else {
>   		list_del_init(&bo_va->base.vm_status);
>   	}



More information about the amd-gfx mailing list