Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20160928222500.11827-1-chris@chris-wilson.co.uk
Signed-off-by: Dave Airlie <airlied@redhat.com>

authored by

Chris Wilson and committed by
Dave Airlie
e86fa21b f5dce665

+2
+2
drivers/gpu/drm/drm_plane.c
··· 898 898 out: 899 899 if (ret && crtc->funcs->page_flip_target) 900 900 drm_crtc_vblank_put(crtc); 901 + if (fb) 902 + drm_framebuffer_unreference(fb); 901 903 if (crtc->primary->old_fb) 902 904 drm_framebuffer_unreference(crtc->primary->old_fb); 903 905 crtc->primary->old_fb = NULL;