summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2017-08-10 02:27:45 +0200
committerDave Airlie <airlied@redhat.com>2017-08-10 02:27:45 +0200
commit52ae28e7e7e316099bd16c3ffd91c4213ac10adc (patch)
treeda4e4450281072a31af6bdcfc78065877b2c3677 /drivers/gpu/drm
parentMerge tag 'drm-intel-fixes-2017-08-09-1' of git://anongit.freedesktop.org/git... (diff)
parentdrm/etnaviv: Fix off-by-one error in reloc checking (diff)
downloadlinux-52ae28e7e7e316099bd16c3ffd91c4213ac10adc.tar.xz
linux-52ae28e7e7e316099bd16c3ffd91c4213ac10adc.zip
Merge branch 'etnaviv/fixes' of https://git.pengutronix.de/git/lst/linux into drm-fixes
single etnaviv fix. * 'etnaviv/fixes' of https://git.pengutronix.de/git/lst/linux: drm/etnaviv: Fix off-by-one error in reloc checking
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c b/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c
index 5bd93169dac2..6463fc2c736f 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c
@@ -270,8 +270,8 @@ static int submit_reloc(struct etnaviv_gem_submit *submit, void *stream,
if (ret)
return ret;
- if (r->reloc_offset >= bo->obj->base.size - sizeof(*ptr)) {
- DRM_ERROR("relocation %u outside object", i);
+ if (r->reloc_offset > bo->obj->base.size - sizeof(*ptr)) {
+ DRM_ERROR("relocation %u outside object\n", i);
return -EINVAL;
}