* [patch 2/5] drivers/gpu/drm/via/via_video.c: fix off by one issue
@ 2010-04-27 21:11 akpm
2010-04-28 7:52 ` Thomas Hellstrom
0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2010-04-27 21:11 UTC (permalink / raw)
To: airlied; +Cc: akpm, dri-devel, error27
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);
_
------------------------------------------------------------------------------
--
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [patch 2/5] drivers/gpu/drm/via/via_video.c: fix off by one issue
2010-04-27 21:11 [patch 2/5] drivers/gpu/drm/via/via_video.c: fix off by one issue akpm
@ 2010-04-28 7:52 ` Thomas Hellstrom
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Hellstrom @ 2010-04-28 7:52 UTC (permalink / raw)
To: akpm; +Cc: airlied, dri-devel, error27
akpm@linux-foundation.org wrote:
> 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>
>
Acked-by: Thomas Hellstrom <thellstrom@vmware.com>
> ---
>
> 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);
> _
>
> ------------------------------------------------------------------------------
> --
> _______________________________________________
> Dri-devel mailing list
> Dri-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dri-devel
>
------------------------------------------------------------------------------
--
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-04-28 7:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-27 21:11 [patch 2/5] drivers/gpu/drm/via/via_video.c: fix off by one issue akpm
2010-04-28 7:52 ` Thomas Hellstrom
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.