Are you referring to this patch which fixes a crash or to the second patch in 
the serries ?

Andrey

________________________________________
From: Zhou1, Tao <[email protected]>
Sent: 13 August 2019 22:24:00
To: Grodzovsky, Andrey; [email protected]
Cc: Deucher, Alexander; Grodzovsky, Andrey; Pan, Xinhui; Zhang, Hawking
Subject: RE: [PATCH 1/2] drm/amdgpu: Fix null ptr when calling 
query_ras_error_count

Hi Andrey:

I'm also working on ras error address saving based on your eeprom patches, and 
the implementation is different from you.
I'll send out my patches this week and we can discuss it.

Regards,
Tao

> -----Original Message-----
> From: amd-gfx <[email protected]> On Behalf Of
> Andrey Grodzovsky
> Sent: 2019年8月14日 1:51
> To: [email protected]
> Cc: Deucher, Alexander <[email protected]>; Grodzovsky,
> Andrey <[email protected]>; Pan, Xinhui
> <[email protected]>; Zhang, Hawking <[email protected]>
> Subject: [PATCH 1/2] drm/amdgpu: Fix null ptr when calling
> query_ras_error_count
>
> ras_err_data.err_addr was never allocated
>
> Signed-off-by: Andrey Grodzovsky <[email protected]>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> index 50c13b0..d9fb860 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> @@ -1011,6 +1011,21 @@ static void amdgpu_ras_interrupt_handler(struct
> ras_manager *obj)
>       int ret;
>       struct ras_err_data err_data = {0, 0, 0, NULL};
>
> +     /* Allocate enough to serve max  number of requests*/
> +     int err_addr_size = data->ring_size / data->aligned_element_size *
> +                        obj->adev->umc.umc_inst_num *
> +                        obj->adev->umc.channel_inst_num;
> +
> +     err_data.err_addr = kcalloc(err_addr_size,
> +                                 sizeof(*err_data.err_addr),
> +                                 GFP_KERNEL);
> +
> +     if (!err_data.err_addr) {
> +             DRM_ERROR("Not enough memory!");
> +             return;
> +     }
> +
> +
>       while (data->rptr != data->wptr) {
>               rmb();
>               memcpy(&entry, &data->ring[data->rptr], @@ -1039,6
> +1054,8 @@ static void amdgpu_ras_interrupt_handler(struct ras_manager
> *obj)
>                       }
>               }
>       }
> +
> +      kfree(err_data.err_addr);
>  }
>
>  static void amdgpu_ras_interrupt_process_handler(struct work_struct
> *work)
> --
> 2.7.4
>
> _______________________________________________
> amd-gfx mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to