From: Dan Carpenter <dan.carpenter@oracle.com>
To: David Airlie <airlied@linux.ie>
Cc: Dave Airlie <airlied@redhat.com>, Ben Skeggs <bskeggs@redhat.com>,
dri-devel@lists.freedesktop.org,
Marcin Slusarz <marcin.slusarz@gmail.com>
Subject: [patch] drm/nouveau: off by one in nouveau_drm_vblank_enable()
Date: Fri, 27 Sep 2013 23:17:14 +0300 [thread overview]
Message-ID: <20130927201714.GI6247@mwanda> (raw)
In-Reply-To: <515C1375.2020405@canonical.com>
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;
next prev parent reply other threads:[~2013-09-27 20:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[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 [this message]
2013-09-27 21:12 ` 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=20130927201714.GI6247@mwanda \
--to=dan.carpenter@oracle.com \
--cc=airlied@linux.ie \
--cc=airlied@redhat.com \
--cc=bskeggs@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=marcin.slusarz@gmail.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 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.