[PATCH] drm/amdgpu: Fix NULL ptr on driver unload due to init failure.

Alex Deucher alexdeucher at gmail.com
Wed Mar 21 18:54:22 UTC 2018


On Wed, Mar 21, 2018 at 2:22 PM, Andrey Grodzovsky
<andrey.grodzovsky at amd.com> wrote:
> Problem:
> When unloading due to failure amdgpu_device_fini was called twice
> which was leading to NULL ptr in amdgpu_irq_disable_all.
>
> Fix:
> Call amdgpu_device_fini only once from amdgpu_driver_unload_kms.
>
> Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky at amd.com>

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 60e577c..c51be05 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -2023,7 +2023,6 @@ int amdgpu_device_init(struct amdgpu_device *adev,
>                 }
>                 dev_err(adev->dev, "amdgpu_device_ip_init failed\n");
>                 amdgpu_vf_error_put(adev, AMDGIM_ERROR_VF_AMDGPU_INIT_FAIL, 0, 0);
> -               amdgpu_device_ip_fini(adev);
>                 goto failed;
>         }
>
> --
> 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