linux_dsm_epyc7002/drivers/gpu/drm
Maarten Lankhorst 6647e6cdba drm/i915: Move cec_notifier to intel_hdmi_connector_unregister, v2.
This fixes the following KASAN splash on module reload:
[  145.136327] ==================================================================
[  145.136502] BUG: KASAN: use-after-free in intel_hdmi_destroy+0x74/0x80 [i915]
[  145.136514] Read of size 8 at addr ffff888216641830 by task kworker/1:1/134

[  145.136535] CPU: 1 PID: 134 Comm: kworker/1:1 Tainted: G     U          T 5.5.0-rc7-valkyria+ #5783
[  145.136539] Hardware name: GIGABYTE GB-BKi3A-7100/MFLP3AP-00, BIOS F1 07/27/2016
[  145.136546] Workqueue: events drm_connector_free_work_fn
[  145.136551] Call Trace:
[  145.136560]  dump_stack+0xa1/0xe0
[  145.136571]  print_address_description.constprop.0+0x1e/0x210
[  145.136639]  ? intel_hdmi_destroy+0x74/0x80 [i915]
[  145.136703]  ? intel_hdmi_destroy+0x74/0x80 [i915]
[  145.136710]  __kasan_report.cold+0x1b/0x37
[  145.136790]  ? intel_hdmi_destroy+0x74/0x80 [i915]
[  145.136863]  ? intel_hdmi_destroy+0x74/0x80 [i915]
[  145.136870]  kasan_report+0x27/0x30
[  145.136881]  __asan_report_load8_noabort+0x1c/0x20
[  145.136946]  intel_hdmi_destroy+0x74/0x80 [i915]
[  145.136954]  drm_connector_free_work_fn+0xd1/0x100
[  145.136967]  process_one_work+0x86e/0x1610
[  145.136987]  ? pwq_dec_nr_in_flight+0x2f0/0x2f0
[  145.137004]  ? move_linked_works+0x128/0x2c0
[  145.137021]  worker_thread+0x63e/0xc90
[  145.137048]  kthread+0x2f6/0x3f0
[  145.137054]  ? calculate_sigpending+0x81/0xa0
[  145.137059]  ? process_one_work+0x1610/0x1610
[  145.137064]  ? kthread_bind+0x40/0x40
[  145.137075]  ret_from_fork+0x24/0x30

[  145.137111] Allocated by task 0:
[  145.137119] (stack is not available)

[  145.137137] Freed by task 5053:
[  145.137147]  save_stack+0x28/0x90
[  145.137152]  __kasan_slab_free+0x136/0x180
[  145.137157]  kasan_slab_free+0x26/0x30
[  145.137161]  kfree+0xe6/0x350
[  145.137242]  intel_ddi_encoder_destroy+0x60/0x80 [i915]
[  145.137252]  drm_mode_config_cleanup+0x11d/0x8f0
[  145.137329]  intel_modeset_driver_remove+0x1f5/0x350 [i915]
[  145.137403]  i915_driver_remove+0xc4/0x130 [i915]
[  145.137482]  i915_pci_remove+0x3e/0x90 [i915]
[  145.137489]  pci_device_remove+0x108/0x2d0
[  145.137494]  device_release_driver_internal+0x1e6/0x4a0
[  145.137499]  driver_detach+0xcb/0x198
[  145.137503]  bus_remove_driver+0xde/0x204
[  145.137508]  driver_unregister+0x6d/0xa0
[  145.137513]  pci_unregister_driver+0x2e/0x230
[  145.137576]  i915_exit+0x1f/0x26 [i915]
[  145.137157]  kasan_slab_free+0x26/0x30
[  145.137161]  kfree+0xe6/0x350
[  145.137242]  intel_ddi_encoder_destroy+0x60/0x80 [i915]
[  145.137252]  drm_mode_config_cleanup+0x11d/0x8f0
[  145.137329]  intel_modeset_driver_remove+0x1f5/0x350 [i915]
[  145.137403]  i915_driver_remove+0xc4/0x130 [i915]
[  145.137482]  i915_pci_remove+0x3e/0x90 [i915]
[  145.137489]  pci_device_remove+0x108/0x2d0
[  145.137494]  device_release_driver_internal+0x1e6/0x4a0
[  145.137499]  driver_detach+0xcb/0x198
[  145.137503]  bus_remove_driver+0xde/0x204
[  145.137508]  driver_unregister+0x6d/0xa0
[  145.137513]  pci_unregister_driver+0x2e/0x230
[  145.137576]  i915_exit+0x1f/0x26 [i915]
[  145.137581]  __x64_sys_delete_module+0x35b/0x470
[  145.137586]  do_syscall_64+0x99/0x4e0
[  145.137591]  entry_SYSCALL_64_after_hwframe+0x49/0xbe

[  145.137606] The buggy address belongs to the object at ffff888216640000
                which belongs to the cache kmalloc-8k of size 8192
[  145.137618] The buggy address is located 6192 bytes inside of
                8192-byte region [ffff888216640000, ffff888216642000)
[  145.137630] The buggy address belongs to the page:
[  145.137640] page:ffffea0008599000 refcount:1 mapcount:0 mapping:ffff888107c02a80 index:0xffff888216644000 compound_mapcount: 0
[  145.137647] raw: 0200000000010200 0000000000000000 0000000100000001 ffff888107c02a80
[  145.137652] raw: ffff888216644000 0000000080020001 00000001ffffffff 0000000000000000
[  145.137656] page dumped because: kasan: bad access detected

[  145.137668] Memory state around the buggy address:
[  145.137678]  ffff888216641700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[  145.137687]  ffff888216641780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[  145.137697] >ffff888216641800: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[  145.137706]                                      ^
[  145.137715]  ffff888216641880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[  145.137724]  ffff888216641900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[  145.137733] ==================================================================
[  145.137742] Disabling lock debugging due to kernel taint

Changes since v1:
- Add fixes tags.
- Use early unregister.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Fixes: 9c229127ae ("drm/i915: hdmi: add CEC notifier to intel_hdmi")
Cc: <stable@vger.kernel.org> # v4.19+
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20200212135445.1469133-1-maarten.lankhorst@linux.intel.com
(cherry picked from commit a581483b1e)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2020-07-14 20:31:39 +03:00
..
amd drm/amdgpu: don't do soft recovery if gpu_recovery=0 2020-07-09 14:42:49 -04:00
arc drm: convert .debugfs_init() hook to return void. 2020-03-18 17:53:28 +01:00
arm drm/komeda: use devm_drm_dev_alloc 2020-04-28 16:04:00 +02:00
armada drm pull for 5.8-rc1 2020-06-02 15:04:15 -07:00
aspeed drm/aspeed: Use devm_drm_dev_alloc 2020-04-28 16:13:03 +02:00
ast drm/ast: fix missing break in switch statement for format->cpp[0] case 4 2020-06-11 09:05:31 +02:00
atmel-hlcdc drm/atmel-hlcdc: Use simple encoder 2020-04-02 14:16:44 +02:00
bochs drm/bochs: Remove explicit drm_connector_register 2020-04-28 16:14:17 +02:00
bridge treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
etnaviv mmap locking API: rename mmap_sem to mmap_lock 2020-06-09 09:39:14 -07:00
exynos drm/exynos: fix ref count leak in mic_pre_enable 2020-06-29 09:38:41 +09:00
fsl-dcu drm/fsl-dcu: Use simple encoder 2020-04-02 14:16:44 +02:00
gma500 drm/gma500: Remove dead code 2020-04-21 09:02:29 +02:00
hisilicon drm/hisilicon/hibmc: Move drm_fbdev_generic_setup() down to avoid the splat 2020-07-08 09:08:22 +00:00
i2c drm/i2c/tda998x: Make tda998x_audio_digital_mute static 2020-05-09 23:06:07 +02:00
i810
i915 drm/i915: Move cec_notifier to intel_hdmi_connector_unregister, v2. 2020-07-14 20:31:39 +03:00
imx drm/imx: Use simple encoder 2020-04-02 14:16:44 +02:00
ingenic drm pull for 5.8-rc1 2020-06-02 15:04:15 -07:00
lib
lima drm/lima: enable runtime pm 2020-04-24 20:51:24 +08:00
mcde drm: mcde: Fix forgotten user of drm->dev_private 2020-06-16 22:22:38 +02:00
mediatek drm/mediatek: mtk_hdmi: Remove debug messages for function calls 2020-07-05 06:39:21 +08:00
meson drm/meson: viu: fix setting the OSD burst length in VIU_OSD1_FIFO_CTRL_STAT 2020-07-02 10:36:56 +02:00
mga
mgag200 drm/mgag200: Embed connector instance in struct mga_device 2020-05-11 16:40:44 +02:00
msm Merge tag 'drm-msm-fixes-2020-06-25' of https://gitlab.freedesktop.org/drm/msm into drm-fixes 2020-07-01 15:01:51 +10:00
mxsfb
nouveau drm/nouveau/nouveau: fix page fault on device private memory 2020-07-08 13:30:42 +10:00
omapdrm treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
panel drm/panel-simple: fix connector type for newhaven_nhd_43_480272ef_atxl 2020-06-21 09:49:53 +02:00
panfrost drm-misc-next for 5.7: 2020-03-12 12:42:56 +10:00
pl111 drm: pl111: Move VExpress setup into versatile init 2020-04-28 14:06:20 -05:00
qxl drm pull for 5.8-rc1 2020-06-02 15:04:15 -07:00
r128 drm: delete drm_pci.h 2020-04-03 17:11:41 +02:00
radeon drm/radeon: fix double free 2020-07-09 14:42:49 -04:00
rcar-du drm: rcar-du: Fix build error 2020-06-21 05:12:57 +03:00
rockchip drm/rockchip: Remove unneeded semicolon 2020-04-27 21:15:55 +02:00
savage
scheduler drm/scheduler: fix drm_sched_get_cleanup_job 2020-04-15 11:09:13 +02:00
selftests
shmobile drm/shmobile: Use simple encoder 2020-04-02 14:16:45 +02:00
sis
sti drm: convert .debugfs_init() hook to return void. 2020-03-18 17:53:28 +01:00
stm drm/stm: ltdc: check number of endpoints 2020-04-27 15:42:12 +02:00
sun4i drm: sun4i: hdmi: Remove extra HPD polling 2020-06-30 10:01:48 +02:00
tdfx
tegra drm/tegra: Add zpos property for cursor planes 2020-06-16 19:03:25 +02:00
tidss drm pull for 5.8-rc1 2020-06-02 15:04:15 -07:00
tilcdc drm/tilcdc: Set up fbdev after fully registering device 2020-04-08 16:24:56 +02:00
tiny drm/cirrus: Move to drm/tiny 2020-04-28 16:05:15 +02:00
ttm Linux 5.8-rc1 2020-06-16 13:31:47 +02:00
tve200
udl drm/udl: Make udl_handle_damage static 2020-05-06 21:08:37 +02:00
v3d drm/v3d: Delete v3d_dev->pdev 2020-04-28 15:15:59 +02:00
vboxvideo drm/vboxvideo: Use devm_gen_pool_create 2020-04-28 15:08:51 +02:00
vc4 drm-misc-next for 5.8: 2020-04-22 10:41:35 +10:00
vgem drm: Garbage collect drm_dev_fini 2020-03-26 15:45:36 +01:00
via
virtio drm pull for 5.8-rc1 2020-06-02 15:04:15 -07:00
vkms drm/vkms: Hold gem object while still in-use 2020-05-06 21:51:46 -04:00
vmwgfx drm: remove drm specific kmap_atomic code 2020-06-04 19:06:22 -07:00
xen drm-misc-next for 5.8: 2020-04-22 10:41:35 +10:00
zte drm/zte: Use simple encoder 2020-04-02 14:16:46 +02:00
drm_agpsupport.c
drm_atomic_helper.c
drm_atomic_state_helper.c drm/atomic-helper: fix kerneldoc 2020-02-15 13:21:22 +01:00
drm_atomic_uapi.c
drm_atomic.c drm: convert .debugfs_init() hook to return void. 2020-03-18 17:53:28 +01:00
drm_auth.c drm: error out with EBUSY when device has existing master 2020-03-30 12:20:41 +01:00
drm_blend.c drm: plane: Verify that no or all planes have a zpos property 2020-05-14 02:10:52 +03:00
drm_bridge_connector.c drm: Add helper to create a connector for a chain of bridges 2020-02-26 13:31:41 +02:00
drm_bridge.c drm: Add helper to create a connector for a chain of bridges 2020-02-26 13:31:41 +02:00
drm_bufs.c drm: delete drm_pci.h 2020-04-03 17:11:41 +02:00
drm_cache.c
drm_client_modeset.c Linux 5.6-rc5 2020-03-11 07:27:21 +10:00
drm_client.c drm: convert .debugfs_init() hook to return void. 2020-03-18 17:53:28 +01:00
drm_color_mgmt.c
drm_connector.c drm/connector: notify userspace on hotplug after register complete 2020-06-03 10:24:23 +02:00
drm_context.c drm: context: Clean up documentation 2020-03-16 09:23:55 +01:00
drm_crtc_helper_internal.h
drm_crtc_helper.c drm: drop unused drm_crtc callback 2020-02-15 21:15:17 +01:00
drm_crtc_internal.h drm: convert .debugfs_init() hook to return void. 2020-03-18 17:53:28 +01:00
drm_crtc.c
drm_damage_helper.c
drm_debugfs_crc.c
drm_debugfs.c drm: convert .debugfs_init() hook to return void. 2020-03-18 17:53:28 +01:00
drm_dma.c drm: delete drm_pci.h 2020-04-03 17:11:41 +02:00
drm_dp_aux_dev.c
drm_dp_cec.c
drm_dp_dual_mode_helper.c
drm_dp_helper.c Short summary of fixes pull (less than what git shortlog provides): 2020-05-28 15:38:39 +10:00
drm_dp_mst_topology_internal.h
drm_dp_mst_topology.c drm pull for 5.8-rc1 2020-06-02 15:04:15 -07:00
drm_drv.c drm: Add devm_drm_dev_alloc macro 2020-04-28 15:05:19 +02:00
drm_dsc.c
drm_dumb_buffers.c
drm_edid_load.c
drm_edid.c drm pull for 5.8-rc1 2020-06-02 15:04:15 -07:00
drm_encoder_slave.c drm: encoder_slave: use new I2C API 2020-06-19 09:20:21 +02:00
drm_encoder.c
drm_fb_cma_helper.c drm: Fix misspellings of "Analog Devices" 2020-04-21 08:15:03 +02:00
drm_fb_helper.c drm/fb-helper: Fix vt restore 2020-06-24 21:34:11 +02:00
drm_file.c drm pull for 5.8-rc1 2020-06-02 15:04:15 -07:00
drm_flip_work.c
drm_format_helper.c drm/format_helper: Dual licence the file in GPL 2 and MIT 2020-02-17 10:27:13 +01:00
drm_fourcc.c
drm_framebuffer.c drm: convert .debugfs_init() hook to return void. 2020-03-18 17:53:28 +01:00
drm_gem_cma_helper.c
drm_gem_framebuffer_helper.c drm: Don't free a struct never allocated by drm_gem_fb_init() 2020-04-16 13:44:29 +02:00
drm_gem_shmem_helper.c drm/shmem: drop pgprot_decrypted() 2020-03-02 07:13:19 +01:00
drm_gem_ttm_helper.c
drm_gem_vram_helper.c drm/vram-helpers: Merge code into a single file 2020-04-09 09:56:33 +02:00
drm_gem.c drm: Manage drm_gem_init with drmm_ 2020-03-26 15:38:09 +01:00
drm_hashtab.c
drm_hdcp.c drm: Fix HDCP failures when SRM fw is missing 2020-05-05 14:01:53 -04:00
drm_internal.h drm: Manage drm_vblank_cleanup with drmm_ 2020-03-26 15:38:17 +01:00
drm_ioc32.c
drm_ioctl.c drm pull for 5.8-rc1 2020-06-02 15:04:15 -07:00
drm_irq.c
drm_kms_helper_common.c
drm_lease.c drm/lease: fix WARNING in idr_destroy 2020-03-18 14:42:18 +01:00
drm_legacy_misc.c
drm_legacy.h
drm_lock.c drm: lock: Clean up documentation 2020-03-16 09:27:09 +01:00
drm_managed.c drm/managed: Fix off-by-one in warning 2020-03-30 21:42:23 +02:00
drm_memory.c
drm_mipi_dbi.c drm/mipi-dbi: Drop explicit drm_mode_config_cleanup call 2020-03-26 16:09:10 +01:00
drm_mipi_dsi.c
drm_mm.c drm/mm: optimize rb_hole_addr rbtree search 2020-05-05 13:39:38 +02:00
drm_mode_config.c drm: Manage drm_mode_config_init with drmm_ 2020-03-26 15:45:43 +01:00
drm_mode_object.c drm: Replace drm_modeset_lock/unlock_all with DRM_MODESET_LOCK_ALL_* helpers 2020-05-05 10:51:56 +02:00
drm_modes.c drm: Nuke mode->hsync 2020-04-29 18:44:26 +03:00
drm_modeset_helper.c
drm_modeset_lock.c
drm_of.c
drm_panel_orientation_quirks.c drm: panel-orientation-quirks: Use generic orientation-data for Acer S1003 2020-06-23 12:32:06 +02:00
drm_panel.c
drm_pci.c drm: delete drm_pci.h 2020-04-03 17:11:41 +02:00
drm_plane_helper.c
drm_plane.c drm: plane: Verify that no or all planes have a zpos property 2020-05-14 02:10:52 +03:00
drm_prime.c drm/prime: fix extracting of the DMA addresses from a scatterlist 2020-04-05 10:44:12 -04:00
drm_print.c
drm_probe_helper.c
drm_property.c
drm_rect.c
drm_scatter.c gpu/drm: remove the powerpc hack in drm_legacy_sg_alloc 2020-06-02 10:59:11 -07:00
drm_scdc_helper.c
drm_self_refresh_helper.c
drm_simple_kms_helper.c drm/simple-kms: Fix documentation for drm_simple_encoder_init() 2020-03-06 09:24:29 +01:00
drm_syncobj.c
drm_sysfs.c drm/connector: notify userspace on hotplug after register complete 2020-06-03 10:24:23 +02:00
drm_trace_points.c
drm_trace.h
drm_vblank.c Short summary of fixes pull (less than what git shortlog provides): 2020-05-28 15:38:39 +10:00
drm_vm.c mm: reorder includes after introduction of linux/pgtable.h 2020-06-09 09:39:13 -07:00
drm_vma_manager.c
drm_writeback.c
Kconfig drm pull for 5.8-rc1 2020-06-02 15:04:15 -07:00
Makefile drm/cirrus: Move to drm/tiny 2020-04-28 16:05:15 +02:00