From: Daniel Vetter <daniel@ffwll.ch>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] drm/core: Fix error condition in __setplane_internal.
Date: Mon, 19 Oct 2015 15:32:16 +0200 [thread overview]
Message-ID: <20151019133216.GD13786@phenom.ffwll.local> (raw)
In-Reply-To: <5624ECCC.9070301@linux.intel.com>
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@intel.com>
> Fixes: 3968be946a057baa
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2015-10-19 13:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-19 13:14 [PATCH] drm/core: Fix error condition in __setplane_internal Maarten Lankhorst
2015-10-19 13:32 ` Daniel Vetter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151019133216.GD13786@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=maarten.lankhorst@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox