dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [patch] drm/nouveau: off by one in nouveau_drm_vblank_enable()
       [not found] <5159DF8D.2010506@canonical.com>
@ 2013-04-03  8:05 ` Dan Carpenter
  2013-04-03 11:33   ` Maarten Lankhorst
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2013-04-03  8:05 UTC (permalink / raw)
  To: David Airlie; +Cc: Dave Airlie, Ben Skeggs, dri-devel

The test here should be ">= ARRAY_SIZE()" instead of "> ARRAY_SIZE()".

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
This was introduced in git://git.freedesktop.org/git/nouveau/linux-2.6 drm-nouveau-fixes-3.9
It hadn't hit linux-next yet yesterday.

diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index c95decf..e11f8e4 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -86,7 +86,7 @@ nouveau_drm_vblank_enable(struct drm_device *dev, int head)
 	struct nouveau_drm *drm = nouveau_drm(dev);
 	struct nouveau_disp *pdisp = nouveau_disp(drm->device);
 
-	if (WARN_ON_ONCE(head > ARRAY_SIZE(drm->vblank)))
+	if (WARN_ON_ONCE(head >= ARRAY_SIZE(drm->vblank)))
 		return -EIO;
 	WARN_ON_ONCE(drm->vblank[head].func);
 	drm->vblank[head].func = nouveau_drm_vblank_handler;

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [patch] drm/nouveau: off by one in nouveau_drm_vblank_enable()
  2013-04-03  8:05 ` [patch] drm/nouveau: off by one in nouveau_drm_vblank_enable() Dan Carpenter
@ 2013-04-03 11:33   ` Maarten Lankhorst
  2013-06-21 11:47     ` Dan Carpenter
  2013-09-27 20:17     ` Dan Carpenter
  0 siblings, 2 replies; 5+ messages in thread
From: Maarten Lankhorst @ 2013-04-03 11:33 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Dave Airlie, Ben Skeggs, dri-devel

Op 03-04-13 10:05, Dan Carpenter schreef:
> The test here should be ">= ARRAY_SIZE()" instead of "> ARRAY_SIZE()".
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
> ---
> This was introduced in git://git.freedesktop.org/git/nouveau/linux-2.6 drm-nouveau-fixes-3.9
> It hadn't hit linux-next yet yesterday.
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
> index c95decf..e11f8e4 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_drm.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
> @@ -86,7 +86,7 @@ nouveau_drm_vblank_enable(struct drm_device *dev, int head)
>  	struct nouveau_drm *drm = nouveau_drm(dev);
>  	struct nouveau_disp *pdisp = nouveau_disp(drm->device);
>  
> -	if (WARN_ON_ONCE(head > ARRAY_SIZE(drm->vblank)))
> +	if (WARN_ON_ONCE(head >= ARRAY_SIZE(drm->vblank)))
>  		return -EIO;
>  	WARN_ON_ONCE(drm->vblank[head].func);
>  	drm->vblank[head].func = nouveau_drm_vblank_handler;
>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch] drm/nouveau: off by one in nouveau_drm_vblank_enable()
  2013-04-03 11:33   ` Maarten Lankhorst
@ 2013-06-21 11:47     ` Dan Carpenter
  2013-09-27 20:17     ` Dan Carpenter
  1 sibling, 0 replies; 5+ messages in thread
From: Dan Carpenter @ 2013-06-21 11:47 UTC (permalink / raw)
  To: Maarten Lankhorst; +Cc: Dave Airlie, Ben Skeggs, dri-devel, Marcin Slusarz

On Wed, Apr 03, 2013 at 01:33:09PM +0200, Maarten Lankhorst wrote:
> Op 03-04-13 10:05, Dan Carpenter schreef:
> > The test here should be ">= ARRAY_SIZE()" instead of "> ARRAY_SIZE()".
> >
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> Acked-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>

We still need this patch in linux-next.

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [patch] drm/nouveau: off by one in nouveau_drm_vblank_enable()
  2013-04-03 11:33   ` Maarten Lankhorst
  2013-06-21 11:47     ` Dan Carpenter
@ 2013-09-27 20:17     ` Dan Carpenter
  2013-09-27 21:12       ` Ben Skeggs
  1 sibling, 1 reply; 5+ messages in thread
From: Dan Carpenter @ 2013-09-27 20:17 UTC (permalink / raw)
  To: David Airlie; +Cc: Dave Airlie, Ben Skeggs, dri-devel, Marcin Slusarz

The test here should be ">= ARRAY_SIZE()" instead of "> ARRAY_SIZE()".

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
---
Somehow this wasn't applied when I sent it earlier.

diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index c95decf..e11f8e4 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -86,7 +86,7 @@ nouveau_drm_vblank_enable(struct drm_device *dev, int head)
 	struct nouveau_drm *drm = nouveau_drm(dev);
 	struct nouveau_disp *pdisp = nouveau_disp(drm->device);
 
-	if (WARN_ON_ONCE(head > ARRAY_SIZE(drm->vblank)))
+	if (WARN_ON_ONCE(head >= ARRAY_SIZE(drm->vblank)))
 		return -EIO;
 	WARN_ON_ONCE(drm->vblank[head].func);
 	drm->vblank[head].func = nouveau_drm_vblank_handler;

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [patch] drm/nouveau: off by one in nouveau_drm_vblank_enable()
  2013-09-27 20:17     ` Dan Carpenter
@ 2013-09-27 21:12       ` Ben Skeggs
  0 siblings, 0 replies; 5+ messages in thread
From: Ben Skeggs @ 2013-09-27 21:12 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Dave Airlie, Ben Skeggs, dri-devel@lists.freedesktop.org,
	Marcin Slusarz

On Sat, Sep 28, 2013 at 6:17 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> The test here should be ">= ARRAY_SIZE()" instead of "> ARRAY_SIZE()".
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> Acked-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
> ---
> Somehow this wasn't applied when I sent it earlier.
Sorry about this slipping through the cracks.  It's in my tree now, so
it'll make it to Dave at some point.

Thanks,
Ben.

>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
> index c95decf..e11f8e4 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_drm.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
> @@ -86,7 +86,7 @@ nouveau_drm_vblank_enable(struct drm_device *dev, int head)
>         struct nouveau_drm *drm = nouveau_drm(dev);
>         struct nouveau_disp *pdisp = nouveau_disp(drm->device);
>
> -       if (WARN_ON_ONCE(head > ARRAY_SIZE(drm->vblank)))
> +       if (WARN_ON_ONCE(head >= ARRAY_SIZE(drm->vblank)))
>                 return -EIO;
>         WARN_ON_ONCE(drm->vblank[head].func);
>         drm->vblank[head].func = nouveau_drm_vblank_handler;
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-09-27 21:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <5159DF8D.2010506@canonical.com>
2013-04-03  8:05 ` [patch] drm/nouveau: off by one in nouveau_drm_vblank_enable() Dan Carpenter
2013-04-03 11:33   ` Maarten Lankhorst
2013-06-21 11:47     ` Dan Carpenter
2013-09-27 20:17     ` Dan Carpenter
2013-09-27 21:12       ` Ben Skeggs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).