All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Skeggs <bskeggs@redhat.com>
To: Dan Carpenter <error27@gmail.com>
Cc: kernel-janitors@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [patch] drm/nouveau: off by one in init_i2c_device_find()
Date: Thu, 03 Jun 2010 01:22:57 +0000	[thread overview]
Message-ID: <1275528177.9064.0.camel@nisroch> (raw)
In-Reply-To: <20100525095227.GH22515@bicker>

On Tue, 2010-05-25 at 11:52 +0200, Dan Carpenter wrote:
> dcb->i2c[] has DCB_MAX_NUM_I2C_ENTRIES entries.
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>
Thanks, picked this up in the nouveau tree.

> 
> diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c
> index e7e69cc..bf92a1e 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_bios.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c
> @@ -814,7 +814,7 @@ init_i2c_device_find(struct drm_device *dev, int i2c_index)
>  	if (i2c_index = 0x81)
>  		i2c_index = (dcb->i2c_default_indices & 0xf0) >> 4;
>  
> -	if (i2c_index > DCB_MAX_NUM_I2C_ENTRIES) {
> +	if (i2c_index >= DCB_MAX_NUM_I2C_ENTRIES) {
>  		NV_ERROR(dev, "invalid i2c_index 0x%x\n", i2c_index);
>  		return NULL;
>  	}



WARNING: multiple messages have this Message-ID (diff)
From: Ben Skeggs <bskeggs@redhat.com>
To: Dan Carpenter <error27@gmail.com>
Cc: kernel-janitors@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [patch] drm/nouveau: off by one in init_i2c_device_find()
Date: Thu, 03 Jun 2010 11:22:57 +1000	[thread overview]
Message-ID: <1275528177.9064.0.camel@nisroch> (raw)
In-Reply-To: <20100525095227.GH22515@bicker>

On Tue, 2010-05-25 at 11:52 +0200, Dan Carpenter wrote:
> dcb->i2c[] has DCB_MAX_NUM_I2C_ENTRIES entries.
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>
Thanks, picked this up in the nouveau tree.

> 
> diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c
> index e7e69cc..bf92a1e 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_bios.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c
> @@ -814,7 +814,7 @@ init_i2c_device_find(struct drm_device *dev, int i2c_index)
>  	if (i2c_index == 0x81)
>  		i2c_index = (dcb->i2c_default_indices & 0xf0) >> 4;
>  
> -	if (i2c_index > DCB_MAX_NUM_I2C_ENTRIES) {
> +	if (i2c_index >= DCB_MAX_NUM_I2C_ENTRIES) {
>  		NV_ERROR(dev, "invalid i2c_index 0x%x\n", i2c_index);
>  		return NULL;
>  	}

  reply	other threads:[~2010-06-03  1:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-25  9:52 [patch] drm/nouveau: off by one in init_i2c_device_find() Dan Carpenter
2010-05-25  9:52 ` Dan Carpenter
2010-06-03  1:22 ` Ben Skeggs [this message]
2010-06-03  1:22   ` 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=1275528177.9064.0.camel@nisroch \
    --to=bskeggs@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --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.