From: Ben Skeggs <bskeggs@redhat.com>
To: Dan Carpenter <error27@gmail.com>
Cc: David Airlie <airlied@linux.ie>,
dri-devel@lists.sourceforge.net, kernel-janitors@vger.kernel.org
Subject: Re: [patch] nouveau: off by one in nv50_gpio_location()
Date: Thu, 03 Jun 2010 01:23:16 +0000 [thread overview]
Message-ID: <1275528196.9064.1.camel@nisroch> (raw)
In-Reply-To: <20100422094053.GL29647@bicker>
On Thu, 2010-04-22 at 11:40 +0200, Dan Carpenter wrote:
> If "gpio->line" is 32 then "nv50_gpio_reg[gpio->line >> 3]" reads past the
> end of the array.
Thanks, picked up in the nouveau tree.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
>
> diff --git a/drivers/gpu/drm/nouveau/nv50_gpio.c b/drivers/gpu/drm/nouveau/nv50_gpio.c
> index c61782b..bb47ad7 100644
> --- a/drivers/gpu/drm/nouveau/nv50_gpio.c
> +++ b/drivers/gpu/drm/nouveau/nv50_gpio.c
> @@ -31,7 +31,7 @@ nv50_gpio_location(struct dcb_gpio_entry *gpio, uint32_t *reg, uint32_t *shift)
> {
> const uint32_t nv50_gpio_reg[4] = { 0xe104, 0xe108, 0xe280, 0xe284 };
>
> - if (gpio->line > 32)
> + if (gpio->line >= 32)
> return -EINVAL;
>
> *reg = nv50_gpio_reg[gpio->line >> 3];
WARNING: multiple messages have this Message-ID (diff)
From: Ben Skeggs <bskeggs@redhat.com>
To: Dan Carpenter <error27@gmail.com>
Cc: David Airlie <airlied@linux.ie>,
dri-devel@lists.sourceforge.net, kernel-janitors@vger.kernel.org
Subject: Re: [patch] nouveau: off by one in nv50_gpio_location()
Date: Thu, 03 Jun 2010 11:23:16 +1000 [thread overview]
Message-ID: <1275528196.9064.1.camel@nisroch> (raw)
In-Reply-To: <20100422094053.GL29647@bicker>
On Thu, 2010-04-22 at 11:40 +0200, Dan Carpenter wrote:
> If "gpio->line" is 32 then "nv50_gpio_reg[gpio->line >> 3]" reads past the
> end of the array.
Thanks, picked up in the nouveau tree.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
>
> diff --git a/drivers/gpu/drm/nouveau/nv50_gpio.c b/drivers/gpu/drm/nouveau/nv50_gpio.c
> index c61782b..bb47ad7 100644
> --- a/drivers/gpu/drm/nouveau/nv50_gpio.c
> +++ b/drivers/gpu/drm/nouveau/nv50_gpio.c
> @@ -31,7 +31,7 @@ nv50_gpio_location(struct dcb_gpio_entry *gpio, uint32_t *reg, uint32_t *shift)
> {
> const uint32_t nv50_gpio_reg[4] = { 0xe104, 0xe108, 0xe280, 0xe284 };
>
> - if (gpio->line > 32)
> + if (gpio->line >= 32)
> return -EINVAL;
>
> *reg = nv50_gpio_reg[gpio->line >> 3];
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
--
next prev parent reply other threads:[~2010-06-03 1:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-22 9:40 [patch] nouveau: off by one in nv50_gpio_location() Dan Carpenter
2010-04-22 9:40 ` Dan Carpenter
2010-06-03 1:23 ` Ben Skeggs [this message]
2010-06-03 1:23 ` Ben Skeggs
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=1275528196.9064.1.camel@nisroch \
--to=bskeggs@redhat.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.sourceforge.net \
--cc=error27@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.