Are you referring to this patch which fixes a crash or to the second patch in the serries ? Andrey ________________________________________ From: Zhou1, Tao <Tao.Zhou1@xxxxxxx> Sent: 13 August 2019 22:24:00 To: Grodzovsky, Andrey; amd-gfx@xxxxxxxxxxxxxxxxxxxxx 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 <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of > Andrey Grodzovsky > Sent: 2019年8月14日 1:51 > To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx > Cc: Deucher, Alexander <Alexander.Deucher@xxxxxxx>; Grodzovsky, > Andrey <Andrey.Grodzovsky@xxxxxxx>; Pan, Xinhui > <Xinhui.Pan@xxxxxxx>; Zhang, Hawking <Hawking.Zhang@xxxxxxx> > 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 <andrey.grodzovsky@xxxxxxx> > --- > 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 > amd-gfx@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/amd-gfx _______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx