Re: [PATCH] drm: Restore lost drm_framebuffer_unreference in drm_mode_page_flip_ioctl

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

 



On Wed, Sep 28, 2016 at 11:25:00PM +0100, Chris Wilson wrote:
> Commit 43968d7b806d ("drm: Extract drm_plane.[hc]") was not the simple
> cut'n'paste we presumed, somehow it introduced a leak of the page flip
> target's framebuffer.
> 
> Fixes: 43968d7b806d ("drm: Extract drm_plane.[hc]")
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Cc: Daniel Vetter <daniel.vetter@xxxxxxxxx>
> Cc: Sean Paul <seanpaul@xxxxxxxxxxxx>

Oops, thanks for catching this, applied to drm-misc.
-Daniel

> ---
>  drivers/gpu/drm/drm_plane.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
> index cd0d475bf3c3..783aef8acab7 100644
> --- a/drivers/gpu/drm/drm_plane.c
> +++ b/drivers/gpu/drm/drm_plane.c
> @@ -898,6 +898,8 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev,
>  out:
>  	if (ret && crtc->funcs->page_flip_target)
>  		drm_crtc_vblank_put(crtc);
> +	if (fb)
> +		drm_framebuffer_unreference(fb);
>  	if (crtc->primary->old_fb)
>  		drm_framebuffer_unreference(crtc->primary->old_fb);
>  	crtc->primary->old_fb = NULL;
> -- 
> 2.9.3
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




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