[PATCH 1/6] drm/amdgpu: fix mutex list null pointer reference

Deucher, Alexander Alexander.Deucher at amd.com
Thu May 4 13:48:33 UTC 2017


> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Xiangliang Yu
> Sent: Thursday, May 04, 2017 2:34 AM
> To: amd-gfx at lists.freedesktop.org
> Cc: Ding, Pixel; Yu, Xiangliang
> Subject: [PATCH 1/6] drm/amdgpu: fix mutex list null pointer reference
> 
> From: Pixel Ding <Pixel.Ding at amd.com>
> 
> Fix NULL pointer reference.
> 
> Signed-off-by: Pixel Ding <Pixel.Ding at amd.com>
> Signed-off-by: Xiangliang Yu <Xiangliang.Yu at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index e685ca9..aef2019 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -2118,7 +2118,8 @@ void amdgpu_device_fini(struct amdgpu_device
> *adev)
> 
>  	DRM_INFO("amdgpu: finishing device.\n");
>  	adev->shutdown = true;
> -	drm_crtc_force_disable_all(adev->ddev);
> +	if (adev->ddev->mode_config.funcs)
> +		drm_crtc_force_disable_all(adev->ddev);

For consistency, I think we generally check for adev->mode_info.mode_confg_initialized or adev->mode_info.num_crtc.  Either way:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

>  	/* evict vram memory */
>  	amdgpu_bo_evict_vram(adev);
>  	amdgpu_ib_pool_fini(adev);
> --
> 2.7.4
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list