On Fri, 2017-11-17 at 04:26 +0000, Liu, Monk wrote:
> I think it's already clear enough 

nice. what a friendly response. good job!

"fix a bug" is definitely not descriptive of the change, and the commit
message does not even parse as a sentence.


Jan

> 
> -----Original Message-----
> From: Jan Vesely [mailto:jv...@scarletmail.rutgers.edu] On Behalf Of Jan 
> Vesely
> Sent: 2017年11月17日 0:40
> To: Liu, Monk <monk....@amd.com>; amd-gfx@lists.freedesktop.org
> Subject: Re: [PATCH 1/2] drm/amdgpu:fix virtual dce bug
> 
> On Thu, 2017-11-16 at 11:14 +0800, Monk Liu wrote:
> > this fix the issue that access memory after freed after driver 
> > unloaded.
> 
> can you please change the patch subject and commit message to something more 
> descriptive?
> 
> Jan
> 
> > 
> > Change-Id: I64e2488c18f5dc044b57c74567785da21fc028da
> > Signed-off-by: Monk Liu <monk....@amd.com>
> > ---
> >  drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c 
> > b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
> > index a8829af..39460eb 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c
> > @@ -437,6 +437,8 @@ static int dce_virtual_sw_fini(void *handle)
> >     drm_kms_helper_poll_fini(adev->ddev);
> >  
> >     drm_mode_config_cleanup(adev->ddev);
> > +   /* clear crtcs pointer to avoid dce irq finish routine access freed 
> > data */
> > +   memset(adev->mode_info.crtcs, 0, sizeof(adev->mode_info.crtcs[0]) * 
> > +AMDGPU_MAX_CRTCS);
> >     adev->mode_info.mode_config_initialized = false;
> >     return 0;
> >  }
> > @@ -723,7 +725,7 @@ static void 
> > dce_virtual_set_crtc_vblank_interrupt_state(struct amdgpu_device *ad
> >                                                     int crtc,
> >                                                     enum 
> > amdgpu_interrupt_state state)  {
> > -   if (crtc >= adev->mode_info.num_crtc) {
> > +   if (crtc >= adev->mode_info.num_crtc || 
> > +!adev->mode_info.crtcs[crtc]) {
> >             DRM_DEBUG("invalid crtc %d\n", crtc);
> >             return;
> >     }

-- 
Jan Vesely <jan.ves...@rutgers.edu>

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to