android_kernel_oneplus_msm8998/drivers/gpu/drm
Stanislav Lisovskiy 8ef21c4005 drm/dp_mst: Check if primary mstb is null
commit 23d8003907d094f77cf959228e2248d6db819fa7 upstream.

Unfortunately drm_dp_get_mst_branch_device which is called from both
drm_dp_mst_handle_down_rep and drm_dp_mst_handle_up_rep seem to rely
on that mgr->mst_primary is not NULL, which seem to be wrong as it can be
cleared with simultaneous mode set, if probing fails or in other case.
mgr->lock mutex doesn't protect against that as it might just get
assigned to NULL right before, not simultaneously.

There are currently bugs 107738, 108616 bugs which crash in
drm_dp_get_mst_branch_device, caused by this issue.

v2: Refactored the code, as it was nicely noticed.
    Fixed Bugzilla bug numbers(second was 108616, but not 108816)
    and added links.

[changed title and added stable cc]
Signed-off-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Cc: stable@vger.kernel.org
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108616
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107738
Link: https://patchwork.freedesktop.org/patch/msgid/20181109090012.24438-1-stanislav.lisovskiy@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-21 09:27:44 +01:00
..
amd drm/amdgpu: Fix SDMA HQD destroy error on gfx_v7 2018-10-20 09:52:33 +02:00
armada drm/armada: fix colorkey mode property 2018-08-24 13:26:58 +02:00
ast drm/drivers: add support for using the arch wc mapping API. 2018-09-09 20:04:36 +02:00
atmel-hlcdc drm: atmel-hlcdc: Fix vertical scaling 2016-09-24 10:07:42 +02:00
bochs
bridge drm/panel: Changes for v4.4-rc1 2015-11-05 11:07:13 +10:00
cirrus drm/drivers: add support for using the arch wc mapping API. 2018-09-09 20:04:36 +02:00
exynos drm/exynos: decon5433: Fix WINCONx reset value 2018-08-24 13:26:57 +02:00
fsl-dcu
gma500 drm/gma500: fix psb_intel_lvds_mode_valid()'s return type 2018-08-06 16:24:38 +02:00
i2c drm/bridge: adv7511: Reset registers on hotplug 2018-09-05 09:18:34 +02:00
i810
i915 drm/i915/userptr: reject zero user_size 2018-09-09 20:04:32 +02:00
imx drm/imx: imx-ldb: check if channel is enabled before printing warning 2018-09-05 09:18:34 +02:00
mga
mgag200 drm/drivers: add support for using the arch wc mapping API. 2018-09-09 20:04:36 +02:00
msm drm/msm: fix leak in failed get_pages 2018-03-24 10:58:46 +01:00
nouveau drm/nouveau/fbcon: fix oops without fbdev emulation 2018-11-10 07:41:37 -08:00
omapdrm drm/omap: fix memory barrier bug in DMM driver 2018-11-21 09:27:38 +01:00
panel drm/panel: type promotion bug in s6e8aa0_read_mtp_id() 2018-09-26 08:35:10 +02:00
qxl drm: qxl: Don't alloc fbdev if emulation is not supported 2018-03-22 09:23:19 +01:00
r128
radeon drm/drivers: add support for using the arch wc mapping API. 2018-09-09 20:04:36 +02:00
rcar-du drm: rcar-du: Fix race condition when disabling planes at CRTC stop 2018-02-16 20:09:37 +01:00
rockchip drm/rockchip: Allow driver to be shutdown on reboot/kexec 2018-11-21 09:27:44 +01:00
savage
shmobile
sis include/uapi/drm/sis_drm.h: move sis_file_private to drivers/gpu/drm/sis/sis_drv.h 2015-10-16 11:27:46 +10:00
sti drm/sti: sti_vtg: Handle return NULL error from devm_ioremap_nocache 2017-11-21 09:21:19 +01:00
tdfx
tegra Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2015-11-10 09:33:06 -08:00
tilcdc
ttm drm/ttm: check the return value of kzalloc 2018-03-03 10:19:44 +01:00
udl udl-kms: fix crash due to uninitialized memory 2018-09-05 09:18:39 +02:00
vc4 drm/vc4: Make sure that planes aren't scaled. 2015-11-17 12:27:03 -08:00
vgem drm/vgem: Drop vgem_drm_gem_mmap 2015-10-19 11:00:44 +02:00
via via_drm.h: move struct via_file_private definition to drivers/gpu/drm/via/via_drv.h 2015-10-16 11:27:49 +10:00
virtio virtio-gpu: fix ioctl and expose the fixed status to userspace. 2018-05-30 07:49:02 +02:00
vmwgfx drm/vmwgfx: Fix a buffer object leak 2018-05-16 10:06:48 +02:00
ati_pcigart.c
drm_agpsupport.c
drm_atomic.c drm/atomic: Handling the case when setting old crtc for plane 2018-08-06 16:24:37 +02:00
drm_atomic_helper.c drm/atomic: fix an error code in mode_fixup() 2017-03-15 09:57:15 +08:00
drm_auth.c
drm_bridge.c
drm_bufs.c
drm_cache.c drm: Restore double clflush on the last partial cacheline 2016-08-20 18:09:23 +02:00
drm_context.c
drm_crtc.c drm: Reject page_flip for !DRIVER_MODESET 2016-09-15 08:27:51 +02:00
drm_crtc_helper.c
drm_crtc_internal.h
drm_debugfs.c
drm_dma.c
drm_dp_helper.c drm/dp: move hw_mutex up the call stack 2016-04-20 15:41:55 +09:00
drm_dp_mst_topology.c drm/dp_mst: Check if primary mstb is null 2018-11-21 09:27:44 +01:00
drm_drv.c drm: drm_minor_register(): Clean up debugfs on failure 2017-11-15 17:13:09 +01:00
drm_edid.c drm/edid: set ELD connector type in drm_edid_to_eld() 2018-03-22 09:23:27 +01:00
drm_edid_load.c
drm_encoder_slave.c
drm_fb_cma_helper.c
drm_fb_helper.c drm/fb_helper: Fix references to dev->mode_config.num_connector 2016-06-07 18:14:36 -07:00
drm_flip_work.c
drm_fops.c drm: set FMODE_UNSIGNED_OFFSET for drm files 2018-06-13 16:15:27 +02:00
drm_gem.c drm: Release driver tracking before making the object available again 2017-08-30 10:19:23 +02:00
drm_gem_cma_helper.c Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2015-11-10 09:33:06 -08:00
drm_global.c
drm_hashtab.c
drm_info.c
drm_internal.h
drm_ioc32.c drm: Only use compat ioctl for addfb2 on X86/IA64 2016-09-24 10:07:43 +02:00
drm_ioctl.c drm: Enforce unlocked ioctl operation for kms driver ioctls 2015-10-16 15:50:54 +02:00
drm_irq.c drm: Defer disabling the vblank IRQ until the next interrupt (for instant-off) 2018-03-22 09:23:20 +01:00
drm_legacy.h
drm_lock.c signals: kill block_all_signals() and unblock_all_signals() 2015-11-06 17:50:42 -08:00
drm_memory.c
drm_mipi_dsi.c
drm_mm.c drm: Apply range restriction after color adjustment when allocation 2017-11-30 08:37:27 +00:00
drm_modes.c drm: Fix broken VT switch with video=1366x768 option 2017-02-01 08:30:52 +01:00
drm_modeset_lock.c drm: Require __GFP_NOFAIL for the legacy drm_modeset_lock_all 2018-02-25 11:03:35 +01:00
drm_of.c drm: Introduce generic probe function for component based masters. 2015-10-20 12:01:29 +02:00
drm_panel.c
drm_pci.c
drm_plane_helper.c
drm_platform.c
drm_prime.c drm/prime: Pass the right module owner through to dma_buf_export() 2016-10-31 04:13:57 -06:00
drm_probe_helper.c drm: Allow determining if current task is output poll worker 2018-03-18 11:17:48 +01:00
drm_rect.c
drm_scatter.c
drm_sysfs.c Merge commit '06d1ee32a4d25356a710b49d5e95dbdd68bdf505' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into drm-next 2015-10-16 10:25:28 +10:00
drm_trace.h
drm_trace_points.c
drm_vm.c
drm_vma_manager.c drm/gem: Use kref_get_unless_zero for the weak mmap references 2015-10-19 11:00:44 +02:00
Kconfig drm/vc4: Add KMS support for Raspberry Pi. 2015-10-21 10:33:12 +01:00
Makefile Merge tag 'drm-vc4-next-2015-10-21' of http://github.com/anholt/linux into drm-next 2015-10-22 10:31:17 +10:00