From: akpm@linux-foundation.org
To: airlied@linux.ie
Cc: akpm@linux-foundation.org, dri-devel@lists.sourceforge.net,
error27@gmail.com
Subject: [patch 2/5] drivers/gpu/drm/via/via_video.c: fix off by one issue
Date: Tue, 27 Apr 2010 14:11:03 -0700 [thread overview]
Message-ID: <201004272111.o3RLB3rc019955@imap1.linux-foundation.org> (raw)
From: Dan Carpenter <error27@gmail.com>
"fx->lock" is used as the index in "dev_priv->decoder_queue[fx->lock]"
which is an array of "VIA_NR_XVMC_LOCKS" elements.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Cc: David Airlie <airlied@linux.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/gpu/drm/via/via_video.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -puN drivers/gpu/drm/via/via_video.c~drivers-gpu-drm-via-via_videoc-fix-off-by-one-issue drivers/gpu/drm/via/via_video.c
--- a/drivers/gpu/drm/via/via_video.c~drivers-gpu-drm-via-via_videoc-fix-off-by-one-issue
+++ a/drivers/gpu/drm/via/via_video.c
@@ -75,7 +75,7 @@ int via_decoder_futex(struct drm_device
DRM_DEBUG("\n");
- if (fx->lock > VIA_NR_XVMC_LOCKS)
+ if (fx->lock >= VIA_NR_XVMC_LOCKS)
return -EFAULT;
lock = (volatile int *)XVMCLOCKPTR(sAPriv, fx->lock);
_
------------------------------------------------------------------------------
--
next reply other threads:[~2010-04-27 21:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-27 21:11 akpm [this message]
2010-04-28 7:52 ` [patch 2/5] drivers/gpu/drm/via/via_video.c: fix off by one issue Thomas Hellstrom
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=201004272111.o3RLB3rc019955@imap1.linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.sourceforge.net \
--cc=error27@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox