3.16.39-rc1 review patch. If anyone has any objections, please let me know.
------------------ From: Daniel Vetter <[email protected]> commit 6f00975c619064a18c23fd3aced325ae165a73b9 upstream. Somehow this one slipped through, which means drivers without modeset support can be oopsed (since those also don't call drm_mode_config_init, which means the crtc lookup will chase an uninitalized idr). Reported-by: Alexander Potapenko <[email protected]> Cc: Alexander Potapenko <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Signed-off-by: Dave Airlie <[email protected]> Signed-off-by: Ben Hutchings <[email protected]> --- drivers/gpu/drm/drm_crtc.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -4236,6 +4236,9 @@ int drm_mode_page_flip_ioctl(struct drm_ unsigned long flags; int ret = -EINVAL; + if (!drm_core_check_feature(dev, DRIVER_MODESET)) + return -EINVAL; + if (page_flip->flags & ~DRM_MODE_PAGE_FLIP_FLAGS || page_flip->reserved != 0) return -EINVAL;

