summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2016-01-25 22:05:00 +0100
committerEric Anholt <eric@anholt.net>2016-02-16 21:20:57 +0100
commite001523666d0b07592abe1822b78ed0e5c2a34ab (patch)
tree311c84cc16b062be8f3592cef4106cebbe94f044 /drivers/gpu
parentLinux 4.5-rc3 (diff)
downloadlinux-e001523666d0b07592abe1822b78ed0e5c2a34ab.tar.xz
linux-e001523666d0b07592abe1822b78ed0e5c2a34ab.zip
drm/vc4: Validate that WAIT_BO padding is cleared.
This is ABI future-proofing if we ever want to extend the pad to mean something. Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/vc4/vc4_gem.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c
index 48ce30a6f4b5..cc89ffcfc6aa 100644
--- a/drivers/gpu/drm/vc4/vc4_gem.c
+++ b/drivers/gpu/drm/vc4/vc4_gem.c
@@ -746,6 +746,9 @@ vc4_wait_bo_ioctl(struct drm_device *dev, void *data,
struct drm_gem_object *gem_obj;
struct vc4_bo *bo;
+ if (args->pad != 0)
+ return -EINVAL;
+
gem_obj = drm_gem_object_lookup(dev, file_priv, args->handle);
if (!gem_obj) {
DRM_ERROR("Failed to look up GEM BO %d\n", args->handle);