drivers/gpu/drm/via/via_video.c: fix off by one issue
"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> Acked-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
committed by
Dave Airlie
parent
ccb2ad579f
commit
22fb573aff
@@ -75,7 +75,7 @@ int via_decoder_futex(struct drm_device *dev, void *data, struct drm_file *file_
|
|||||||
|
|
||||||
DRM_DEBUG("\n");
|
DRM_DEBUG("\n");
|
||||||
|
|
||||||
if (fx->lock > VIA_NR_XVMC_LOCKS)
|
if (fx->lock >= VIA_NR_XVMC_LOCKS)
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
lock = (volatile int *)XVMCLOCKPTR(sAPriv, fx->lock);
|
lock = (volatile int *)XVMCLOCKPTR(sAPriv, fx->lock);
|
||||||
|
Reference in New Issue
Block a user