summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_atomic.c
diff options
context:
space:
mode:
authorLyude2016-05-12 16:56:59 +0200
committerDaniel Vetter2016-05-17 15:44:41 +0200
commit255f0e7c418ad95a4baeda017ae6182ba9b3c423 (patch)
tree6363607e632a4253db295a9b9d3becce37a5146a /drivers/gpu/drm/drm_atomic.c
parentdrm/i915/fbdev: Fix num_connector references in intel_fb_initial_config() (diff)
downloadkernel-qcow2-linux-255f0e7c418ad95a4baeda017ae6182ba9b3c423.tar.gz
kernel-qcow2-linux-255f0e7c418ad95a4baeda017ae6182ba9b3c423.tar.xz
kernel-qcow2-linux-255f0e7c418ad95a4baeda017ae6182ba9b3c423.zip
drm/fb_helper: Fix references to dev->mode_config.num_connector
During boot, MST hotplugs are generally expected (even if no physical hotplugging occurs) and result in DRM's connector topology changing. This means that using num_connector from the current mode configuration can lead to the number of connectors changing under us. This can lead to some nasty scenarios in fbcon: - We allocate an array to the size of dev->mode_config.num_connectors. - MST hotplug occurs, dev->mode_config.num_connectors gets incremented. - We try to loop through each element in the array using the new value of dev->mode_config.num_connectors, and end up going out of bounds since dev->mode_config.num_connectors is now larger then the array we allocated. fb_helper->connector_count however, will always remain consistent while we do a modeset in fb_helper. Note: This is just polish for 4.7, Dave Airlie's drm_connector refcounting fixed these bugs for real. But it's good enough duct-tape for stable kernel backporting, since backporting the refcounting changes is way too invasive. Cc: stable@vger.kernel.org Signed-off-by: Lyude <cpaul@redhat.com> [danvet: Clarify why we need this. Also remove the now unused "dev" local variable to appease gcc.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1463065021-18280-3-git-send-email-cpaul@redhat.com
Diffstat (limited to 'drivers/gpu/drm/drm_atomic.c')
0 files changed, 0 insertions, 0 deletions