drm: Fix framebuffer leak
Subsystems (2)
PATCH 1/1 drm: Fix framebuffer leak
Do not leak framebuffer if client provided crtc id found invalid.
Signed-off-by Nikhil Mahale <[email protected]>
--- drivers/gpu/drm/drm_plane.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/drm_plane.c +1 -0
@@ -601,6 +601,7 @@ int drm_mode_setplane(struct drm_device *dev, void *data, crtc =drm_crtc_find (dev, plane_req->crtc_id);if (!crtc) { +drm_framebuffer_put (fb);DRM_DEBUG_KMS ("Unknown crtc ID %d\n" , plane_req->crtc_id);return -ENOENT ;
Signature · 6 lines
2.6.6 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 3 lines · Nikhil Mahale
Do not leak framebuffer if client provided crtc id found invalid.
Signed-off-by Nikhil Mahale <[email protected]>
Nice catch, applied for 4.13-rc and cc: stable.
-Daniel
Quoted 23 lines
--- drivers/gpu/drm/drm_plane.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/drm_plane.c +1
-0@@ -601,6 +601,7 @@ int drm_mode_setplane(struct drm_device *dev, void *data, crtc =drm_crtc_find (dev, plane_req->crtc_id);if (!crtc) { +drm_framebuffer_put (fb);DRM_DEBUG_KMS ("Unknown crtc ID %d\n" , plane_req->crtc_id);return -ENOENT ;Signature · 6 lines
2.6.6 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel