7b19914383
When a main MST port is disconnected drivers should call
drm_dp_mst_topology_mgr_set_mst() disabling the MST manager, this
function will set manager mst_primary to NULL and it will cause the
crash bellow on the next atomic check when trying to access
mst_primary->port.
As there is no use in running checks over managers that are not
active this patch will skip it.
[ 305.616450] [drm:drm_dp_mst_atomic_check] [MST PORT:00000000cc2049e9] releases all VCPI slots
[ 305.625085] [drm:drm_dp_mst_atomic_check] [MST PORT:00000000020ab43e] releases all VCPI slots
[ 305.633729] [drm:drm_dp_mst_atomic_check] [MST MGR:00000000cdd467d4] mst state 00000000b67672eb VCPI avail=63 used=0
[ 305.644405] BUG: kernel NULL pointer dereference, address: 0000000000000030
[ 305.651448] #PF: supervisor read access in kernel mode
[ 305.656640] #PF: error_code(0x0000) - not-present page
[ 305.661807] PGD 0 P4D 0
[ 305.664396] Oops: 0000 [#1] PREEMPT SMP NOPTI
[ 305.668789] CPU: 3 PID: 183 Comm: kworker/3:2 Not tainted 5.5.0-rc6+ #1404
[ 305.675703] Hardware name: Intel Corporation Ice Lake Client Platform/IceLake U DDR4 SODIMM PD RVP TLC, BIOS ICLSFWR1.R00.3201.A00.1905140358 05/14/2019
[ 305.689425] Workqueue: events drm_dp_delayed_destroy_work
[ 305.694874] RIP: 0010:drm_dp_mst_atomic_check+0x138/0x2c0
[ 305.700306] Code: 00 00 00 41 29 d9 41 89 d8 4c 89 fa 4c 89 f1 48 c7 c6 b0 b1 34 82 bf 10 00 00 00 45 31 ed e8 3f 99 02 00 4d 8b bf 80 04 00 00 <49> 8b 47 30 49 8d 5f 30 4c 8d 60 e8 48 39 c3 74 35 49 8b 7c 24 28
[ 305.719169] RSP: 0018:ffffc90001687b58 EFLAGS: 00010246
[ 305.724434] RAX: 0000000000000000 RBX: 000000000000003f RCX: 0000000000000000
[ 305.731611] RDX: 0000000000000000 RSI: ffff88849fba8cb8 RDI: 00000000ffffffff
[ 305.738785] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000001
[ 305.745962] R10: ffffc900016879a0 R11: ffffc900016879a5 R12: 0000000000000000
[ 305.753139] R13: 0000000000000000 R14: ffff8884905c9bc0 R15: 0000000000000000
[ 305.760315] FS: 0000000000000000(0000) GS:ffff88849fb80000(0000) knlGS:0000000000000000
[ 305.768452] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 305.774263] CR2: 0000000000000030 CR3: 0000000005610006 CR4: 0000000000760ee0
[ 305.781441] PKRU: 55555554
[ 305.784228] Call Trace:
[ 305.786739] intel_atomic_check+0xb2e/0x2560 [i915]
[ 305.791678] ? printk+0x53/0x6a
[ 305.794856] ? drm_atomic_check_only+0x3e/0x810
[ 305.799417] ? __drm_dbg+0x82/0x90
[ 305.802848] drm_atomic_check_only+0x56a/0x810
[ 305.807322] drm_atomic_commit+0xe/0x50
[ 305.811185] drm_client_modeset_commit_atomic+0x1e2/0x250
[ 305.816619] drm_client_modeset_commit_force+0x4d/0x180
[ 305.821921] drm_fb_helper_restore_fbdev_mode_unlocked+0x46/0xa0
[ 305.827963] drm_fb_helper_set_par+0x2b/0x40
[ 305.832265] drm_fb_helper_hotplug_event.part.0+0xb2/0xd0
[ 305.837755] drm_kms_helper_hotplug_event+0x21/0x30
[ 305.842694] process_one_work+0x25b/0x5b0
[ 305.846735] worker_thread+0x4b/0x3b0
[ 305.850439] kthread+0x100/0x140
[ 305.853690] ? process_one_work+0x5b0/0x5b0
[ 305.857901] ? kthread_park+0x80/0x80
[ 305.861588] ret_from_fork+0x24/0x50
[ 305.865202] Modules linked in: snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic i915 btusb btrtl btbcm btintel bluetooth prime_numbers snd_hda_intel snd_intel_dspcfg snd_hda_codec e1000e snd_hwdep snd_hda_core thunderbolt mei_hdcp mei_me asix cdc_ether x86_pkg_temp_thermal r8152 mei coretemp usbnet snd_pcm mii crct10dif_pclmul ptp crc32_pclmul ecdh_generic ghash_clmulni_intel pps_core ecc i2c_i801 intel_lpss_pci
[ 305.903096] CR2: 0000000000000030
[ 305.906431] ---[ end trace 70ee364eed801cb0 ]---
[ 305.940816] RIP: 0010:drm_dp_mst_atomic_check+0x138/0x2c0
[ 305.946261] Code: 00 00 00 41 29 d9 41 89 d8 4c 89 fa 4c 89 f1 48 c7 c6 b0 b1 34 82 bf 10 00 00 00 45 31 ed e8 3f 99 02 00 4d 8b bf 80 04 00 00 <49> 8b 47 30 49 8d 5f 30 4c 8d 60 e8 48 39 c3 74 35 49 8b 7c 24 28
[ 305.965125] RSP: 0018:ffffc90001687b58 EFLAGS: 00010246
[ 305.970382] RAX: 0000000000000000 RBX: 000000000000003f RCX: 0000000000000000
[ 305.977571] RDX: 0000000000000000 RSI: ffff88849fba8cb8 RDI: 00000000ffffffff
[ 305.984747] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000001
[ 305.991921] R10: ffffc900016879a0 R11: ffffc900016879a5 R12: 0000000000000000
[ 305.999099] R13: 0000000000000000 R14: ffff8884905c9bc0 R15: 0000000000000000
[ 306.006271] FS: 0000000000000000(0000) GS:ffff88849fb80000(0000) knlGS:0000000000000000
[ 306.014407] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 306.020185] CR2: 0000000000000030 CR3: 000000048b3aa003 CR4: 0000000000760ee0
[ 306.027404] PKRU: 55555554
[ 306.030127] BUG: sleeping function called from invalid context at include/linux/percpu-rwsem.h:38
[ 306.039049] in_atomic(): 0, irqs_disabled(): 1, non_block: 0, pid: 183, name: kworker/3:2
[ 306.047272] INFO: lockdep is turned off.
[ 306.051217] irq event stamp: 77505
[ 306.054647] hardirqs last enabled at (77505): [<ffffffff81a0c147>] _raw_spin_unlock_irqrestore+0x47/0x60
[ 306.064270] hardirqs last disabled at (77504): [<ffffffff81a0bedf>] _raw_spin_lock_irqsave+0xf/0x50
[ 306.073404] softirqs last enabled at (77402): [<ffffffff81e00389>] __do_softirq+0x389/0x47f
[ 306.081885] softirqs last disabled at (77395): [<ffffffff810b83a9>] irq_exit+0xa9/0xc0
[ 306.089859] CPU: 3 PID: 183 Comm: kworker/3:2 Tainted: G D 5.5.0-rc6+ #1404
[ 306.098167] Hardware name: Intel Corporation Ice Lake Client Platform/IceLake U DDR4 SODIMM PD RVP TLC, BIOS ICLSFWR1.R00.3201.A00.1905140358 05/14/2019
[ 306.111882] Workqueue: events drm_dp_delayed_destroy_work
[ 306.117314] Call Trace:
[ 306.119780] dump_stack+0x71/0xa0
[ 306.123135] ___might_sleep.cold+0xf7/0x10b
[ 306.127399] exit_signals+0x2b/0x360
[ 306.131014] do_exit+0xa7/0xc70
[ 306.134189] ? kthread+0x100/0x140
[ 306.137615] rewind_stack_do_exit+0x17/0x20
Fixes:
|
||
---|---|---|
.. | ||
amd | ||
arc | ||
arm | ||
armada | ||
aspeed | ||
ast | ||
atmel-hlcdc | ||
bochs | ||
bridge | ||
cirrus | ||
etnaviv | ||
exynos | ||
fsl-dcu | ||
gma500 | ||
hisilicon | ||
i2c | ||
i810 | ||
i915 | ||
imx | ||
ingenic | ||
lib | ||
lima | ||
mcde | ||
mediatek | ||
meson | ||
mga | ||
mgag200 | ||
msm | ||
mxsfb | ||
nouveau | ||
omapdrm | ||
panel | ||
panfrost | ||
pl111 | ||
qxl | ||
r128 | ||
radeon | ||
rcar-du | ||
rockchip | ||
savage | ||
scheduler | ||
selftests | ||
shmobile | ||
sis | ||
sti | ||
stm | ||
sun4i | ||
tdfx | ||
tegra | ||
tilcdc | ||
tiny | ||
ttm | ||
tve200 | ||
udl | ||
v3d | ||
vboxvideo | ||
vc4 | ||
vgem | ||
via | ||
virtio | ||
vkms | ||
vmwgfx | ||
xen | ||
zte | ||
drm_agpsupport.c | ||
drm_atomic_helper.c | ||
drm_atomic_state_helper.c | ||
drm_atomic_uapi.c | ||
drm_atomic.c | ||
drm_auth.c | ||
drm_blend.c | ||
drm_bridge.c | ||
drm_bufs.c | ||
drm_cache.c | ||
drm_client_modeset.c | ||
drm_client.c | ||
drm_color_mgmt.c | ||
drm_connector.c | ||
drm_context.c | ||
drm_crtc_helper_internal.h | ||
drm_crtc_helper.c | ||
drm_crtc_internal.h | ||
drm_crtc.c | ||
drm_damage_helper.c | ||
drm_debugfs_crc.c | ||
drm_debugfs.c | ||
drm_dma.c | ||
drm_dp_aux_dev.c | ||
drm_dp_cec.c | ||
drm_dp_dual_mode_helper.c | ||
drm_dp_helper.c | ||
drm_dp_mst_topology_internal.h | ||
drm_dp_mst_topology.c | ||
drm_drv.c | ||
drm_dsc.c | ||
drm_dumb_buffers.c | ||
drm_edid_load.c | ||
drm_edid.c | ||
drm_encoder_slave.c | ||
drm_encoder.c | ||
drm_fb_cma_helper.c | ||
drm_fb_helper.c | ||
drm_file.c | ||
drm_flip_work.c | ||
drm_format_helper.c | ||
drm_fourcc.c | ||
drm_framebuffer.c | ||
drm_gem_cma_helper.c | ||
drm_gem_framebuffer_helper.c | ||
drm_gem_shmem_helper.c | ||
drm_gem_ttm_helper.c | ||
drm_gem_vram_helper.c | ||
drm_gem.c | ||
drm_hashtab.c | ||
drm_hdcp.c | ||
drm_internal.h | ||
drm_ioc32.c | ||
drm_ioctl.c | ||
drm_irq.c | ||
drm_kms_helper_common.c | ||
drm_lease.c | ||
drm_legacy_misc.c | ||
drm_legacy.h | ||
drm_lock.c | ||
drm_memory.c | ||
drm_mipi_dbi.c | ||
drm_mipi_dsi.c | ||
drm_mm.c | ||
drm_mode_config.c | ||
drm_mode_object.c | ||
drm_modes.c | ||
drm_modeset_helper.c | ||
drm_modeset_lock.c | ||
drm_of.c | ||
drm_panel_orientation_quirks.c | ||
drm_panel.c | ||
drm_pci.c | ||
drm_plane_helper.c | ||
drm_plane.c | ||
drm_prime.c | ||
drm_print.c | ||
drm_probe_helper.c | ||
drm_property.c | ||
drm_rect.c | ||
drm_scatter.c | ||
drm_scdc_helper.c | ||
drm_self_refresh_helper.c | ||
drm_simple_kms_helper.c | ||
drm_syncobj.c | ||
drm_sysfs.c | ||
drm_trace_points.c | ||
drm_trace.h | ||
drm_vblank.c | ||
drm_vm.c | ||
drm_vma_manager.c | ||
drm_vram_helper_common.c | ||
drm_writeback.c | ||
Kconfig | ||
Makefile |