Re: [PATCH] drm/core: Fix error condition in __setplane_internal.

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

 



On Mon, Oct 19, 2015 at 03:14:52PM +0200, Maarten Lankhorst wrote:
> Just like the other checks the crtc coordinates need to use goto out.
> 
> This fixes a framebuffer leak introduced by commit 3968be946a057baa.
> "drm: Make integer overflow checking cover universal cursor updates (v2)"
> 
> Cc: Matt Roper <matthew.d.roper@xxxxxxxxx>
> Fixes: 3968be946a057baa
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>

I already merged a patch from Ville to fix this. At least git didn't
manage to apply yours on top ;-)
-Daniel

> ---
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> index 7ec0247cf8db..7db9b3ed5415 100644
> --- a/drivers/gpu/drm/drm_crtc.c
> +++ b/drivers/gpu/drm/drm_crtc.c
> @@ -2342,7 +2342,8 @@ static int __setplane_internal(struct drm_plane *plane,
>  	    crtc_y > INT_MAX - (int32_t) crtc_h) {
>  		DRM_DEBUG_KMS("Invalid CRTC coordinates %ux%u+%d+%d\n",
>  			      crtc_w, crtc_h, crtc_x, crtc_y);
> -		return -ERANGE;
> +		ret = -ERANGE;
> +		goto out;
>  	}
>  
>  
> 

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




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux