diff options
author | Mika Kuoppala <mika.kuoppala@linux.intel.com> | 2013-11-12 19:49:35 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-11-13 11:51:49 +0100 |
commit | 661df0415e6f6bfaade501fb94cc324fa44f29b4 (patch) | |
tree | 4364c8f015b8457317ce99763c2e9a86d420ecae /drivers/gpu/drm | |
parent | b53c8c3577150a70e94b10090f68cfe3a4b601a5 (diff) | |
download | talos-op-linux-661df0415e6f6bfaade501fb94cc324fa44f29b4.tar.gz talos-op-linux-661df0415e6f6bfaade501fb94cc324fa44f29b4.zip |
drm/i915: check i915_get_reset_stats_ioctl args
Insist that flags and pad fields are zero, so that
we can safely extend the interface in future.
Testcase: igt/gem_reset_stats/params
Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/i915/intel_uncore.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c index 21cf9519be78..a881906969eb 100644 --- a/drivers/gpu/drm/i915/intel_uncore.c +++ b/drivers/gpu/drm/i915/intel_uncore.c @@ -641,6 +641,9 @@ int i915_get_reset_stats_ioctl(struct drm_device *dev, struct i915_ctx_hang_stats *hs; int ret; + if (args->flags || args->pad) + return -EINVAL; + if (args->ctx_id == DEFAULT_CONTEXT_ID && !capable(CAP_SYS_ADMIN)) return -EPERM; |