From: "james qian wang (Arm Technology China)" <james.qian.wang@arm.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: David Airlie <airlied@linux.ie>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>, nd <nd@arm.com>,
Liviu Dudau <Liviu.Dudau@arm.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>
Subject: Re: drm/komeda: Off by one in komeda_fb_get_pixel_addr()
Date: Thu, 24 Jan 2019 02:03:30 +0000 [thread overview]
Message-ID: <20190124020316.GA26717@james-ThinkStation-P300> (raw)
In-Reply-To: <20190123093755.GA26018@kadam>
On Wed, Jan 23, 2019 at 12:37:55PM +0300, Dan Carpenter wrote:
> The > should be >= to avoid an off by one bug.
>
> Fixes: c46c24bb6b11 ("drm/komeda: Add komeda_framebuffer")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
>
> I'm 98% sure this is correct, but please review it carefully because I'm
> not 100% positive.
Hi Dan:
Thank you, this is a typo and your fix is correct.
Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Best Regards
James.
>
> drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c b/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c
> index 4ddd5314ca23..23ee74d42239 100644
> --- a/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c
> +++ b/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c
> @@ -144,7 +144,7 @@ komeda_fb_get_pixel_addr(struct komeda_fb *kfb, int x, int y, int plane)
> const struct drm_gem_cma_object *obj;
> u32 plane_x, plane_y, cpp, pitch, offset;
>
> - if (plane > fb->format->num_planes) {
> + if (plane >= fb->format->num_planes) {
> DRM_DEBUG_KMS("Out of max plane num.\n");
> return -EINVAL;
> }
prev parent reply other threads:[~2019-01-24 2:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-23 9:37 [PATCH] drm/komeda: Off by one in komeda_fb_get_pixel_addr() Dan Carpenter
2019-01-24 2:03 ` james qian wang (Arm Technology China) [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=20190124020316.GA26717@james-ThinkStation-P300 \
--to=james.qian.wang@arm.com \
--cc=Liviu.Dudau@arm.com \
--cc=airlied@linux.ie \
--cc=dan.carpenter@oracle.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=nd@arm.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