Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm: disallow legacy sg ioctls for modesetting drivers

Only the radeon/r128/ati ums drivers use this. Furthermore the cleanup
was already only done for UMS drivers. Also a quick check of the ATI
ddx git history shows that only the UMS code ever used this facility.

So we can safely disallow these pair of ioctls for modesetting
drivers.

Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Dave Airlie <airlied@redhat.com>

authored by

Daniel Vetter and committed by
Dave Airlie
8e194bbf 3d914e83

+6
+6
drivers/gpu/drm/drm_scatter.c
··· 87 87 88 88 DRM_DEBUG("\n"); 89 89 90 + if (drm_core_check_feature(dev, DRIVER_MODESET)) 91 + return -EINVAL; 92 + 90 93 if (!drm_core_check_feature(dev, DRIVER_SG)) 91 94 return -EINVAL; 92 95 ··· 199 196 { 200 197 struct drm_scatter_gather *request = data; 201 198 struct drm_sg_mem *entry; 199 + 200 + if (drm_core_check_feature(dev, DRIVER_MODESET)) 201 + return -EINVAL; 202 202 203 203 if (!drm_core_check_feature(dev, DRIVER_SG)) 204 204 return -EINVAL;