[PATCH] drm: Restore lost drm_framebuffer_unreference in drm_mode_page_flip_ioctl
Chris Wilson
chris at chris-wilson.co.uk
Wed Sep 28 22:25:00 UTC 2016
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 at chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter at intel.com>
Cc: Sean Paul <seanpaul at chromium.org>
---
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
More information about the dri-devel
mailing list