Skip to content

Commit

Permalink
drm/i915: Forward all core DRM ioctls to core compat handling
Browse files Browse the repository at this point in the history
Previously only core DRM ioctls under the DRM_COMMAND_BASE were being
forwarded, but the drm.h header suggests (and reality confirms) ones
after (and including) DRM_COMMAND_END should be forwarded as well.

We need this to correctly forward the compat ioctl for the botched-up
addfb2.1 extension.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: stable@vger.kernel.org # 4.1+
[danvet: Explain why this is suddenly needed and add cc: stable.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Tvrtko Ursulin authored and Daniel Vetter committed Jul 14, 2015
1 parent bbf4702 commit ac7e7ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/i915_ioc32.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ long i915_compat_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
drm_ioctl_compat_t *fn = NULL;
int ret;

if (nr < DRM_COMMAND_BASE)
if (nr < DRM_COMMAND_BASE || nr >= DRM_COMMAND_END)
return drm_compat_ioctl(filp, cmd, arg);

if (nr < DRM_COMMAND_BASE + ARRAY_SIZE(i915_compat_ioctls))
Expand Down

0 comments on commit ac7e7ab

Please sign in to comment.