drivers/gpu/drm/via/via_video.c: fix off by one issue
Subsystems (2)
PATCH 2/5 drivers/gpu/drm/via/via_video.c: fix off by one issue
From: Dan Carpenter <[email protected]>
"fx->lock" is used as the index in "dev_priv->decoder_queue[fx->lock]" which is an array of "VIA_NR_XVMC_LOCKS" elements.
---
drivers/gpu/drm/via/via_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/via/via_video.c renamed from drivers/gpu/drm/via/via_video.c~drivers-gpu-drm-via-via_videoc-fix-off-by-one-issue +1 -1
@@ -75,7 +75,7 @@ int via_decoder_futex(struct drm_deviceDRM_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);
_
------------------------------------------------------------------------------
--
Quoted 9 lines · [email protected] wrote:
From: Dan Carpenter <[email protected]>
"
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 <[email protected]>Cc David Airlie <[email protected]>Signed-off-by Andrew Morton <[email protected]>
Quoted 19 lines
---
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-issuedrivers/gpu/drm/via/via_video.cdrivers/gpu/drm/via/via_video.c renamed from drivers/gpu/drm/via/via_video.c~drivers-gpu-drm-via-via_videoc-fix-off-by-one-issue +1
-1@@ -75,7 +75,7 @@ int via_decoder_futex(struct drm_deviceDRM_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);_
Quoted 7 lines
------------------------------------------------------------------------------
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel
------------------------------------------------------------------------------
--