RE: [PATCH] drm/amdgpu: Clear garbage data in err_data before usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[AMD Official Use Only]

Reviewed-by: Tao Zhou <tao.zhou1@xxxxxxx>

May I know how do you reproduce the issue?

> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of Jiawei
> Gu
> Sent: Thursday, January 6, 2022 5:17 PM
> To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx; Clements, John
> <John.Clements@xxxxxxx>; Yang, Stanley <Stanley.Yang@xxxxxxx>; Deng,
> Emily <Emily.Deng@xxxxxxx>
> Cc: Gu, JiaWei (Will) <JiaWei.Gu@xxxxxxx>
> Subject: [PATCH] drm/amdgpu: Clear garbage data in err_data before usage
> 
> Memory of err_data should be cleaned before usage when there're multiple
> entry in ras ih.
> Otherwise garbage data from last loop will be used.
> 
> Signed-off-by: Jiawei Gu <Jiawei.Gu@xxxxxxx>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> index 31bad1a20ed0..3f5bf5780ebf 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
> @@ -1592,6 +1592,7 @@ static void amdgpu_ras_interrupt_handler(struct
> ras_manager *obj)
>  				/* Let IP handle its data, maybe we need get
> the output
>  				 * from the callback to udpate the error
> type/count, etc
>  				 */
> +				memset(&err_data, 0, sizeof(err_data));
>  				ret = data->cb(obj->adev, &err_data, &entry);
>  				/* ue will trigger an interrupt, and in that case
>  				 * we need do a reset to recovery the whole
> system.
> --
> 2.17.1




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux