forked from luck/tmp_suning_uos_patched
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:
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");
|
||||
|
||||
if (fx->lock > VIA_NR_XVMC_LOCKS)
|
||||
if (fx->lock >= VIA_NR_XVMC_LOCKS)
|
||||
return -EFAULT;
|
||||
|
||||
lock = (volatile int *)XVMCLOCKPTR(sAPriv, fx->lock);
|
||||
|
Loading…
Reference in New Issue
Block a user