From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:41691 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752333AbcIIQHG (ORCPT ); Fri, 9 Sep 2016 12:07:06 -0400 Subject: Patch "drm: Reject page_flip for !DRIVER_MODESET" has been added to the 4.4-stable tree To: daniel.vetter@ffwll.ch, airlied@redhat.com, chris@chris-wilson.co.uk, daniel.vetter@intel.com, glider@google.com, gregkh@linuxfoundation.org Cc: , From: Date: Fri, 09 Sep 2016 18:06:58 +0200 Message-ID: <147343721850217@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled drm: Reject page_flip for !DRIVER_MODESET to the 4.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: drm-reject-page_flip-for-driver_modeset.patch and it can be found in the queue-4.4 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 6f00975c619064a18c23fd3aced325ae165a73b9 Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Sat, 20 Aug 2016 12:22:11 +0200 Subject: drm: Reject page_flip for !DRIVER_MODESET From: Daniel Vetter 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 Cc: Alexander Potapenko Signed-off-by: Daniel Vetter Reviewed-by: Chris Wilson Signed-off-by: Dave Airlie Signed-off-by: Greg Kroah-Hartman --- 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 @@ -5231,6 +5231,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; Patches currently in stable-queue which might be from daniel.vetter@ffwll.ch are queue-4.4/0078-drm-atomic-Do-not-unset-crtc-when-an-encoder-is-stol.patch queue-4.4/drm-reject-page_flip-for-driver_modeset.patch queue-4.4/0130-drm-i915-Only-ignore-eDP-ports-that-are-connected.patch queue-4.4/0111-drm-Balance-error-path-for-GEM-handle-allocation.patch queue-4.4/0087-drm-i915-Fix-hpd-live-status-bits-for-g4x.patch