From: Chris Wilson Date: Wed, 28 Sep 2016 22:25:00 +0000 (+0100) Subject: drm: Restore lost drm_framebuffer_unreference in drm_mode_page_flip_ioctl X-Git-Tag: v4.9-rc1~41^2~7 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=e86fa21b77f4ef840213ecd33230c7c16879a4ac;p=linux.git drm: Restore lost drm_framebuffer_unreference in drm_mode_page_flip_ioctl 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 Cc: Daniel Vetter Cc: Sean Paul Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/20160928222500.11827-1-chris@chris-wilson.co.uk Signed-off-by: Dave Airlie --- 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;