linux/drivers/gpu/drm
Jiri Kosina 4ef87d8f10 drm/amdgpu: Fix resource leak on probe error path
This reverts commit 4192f7b576.

It is not true (as stated in the reverted commit changelog) that we never
unmap the BAR on failure; it actually does happen properly on
amdgpu_driver_load_kms() -> amdgpu_driver_unload_kms() ->
amdgpu_device_fini() error path.

What's worse, this commit actually completely breaks resource freeing on
probe failure (like e.g. failure to load microcode), as
amdgpu_driver_unload_kms() notices adev->rmmio being NULL and bails too
early, leaving all the resources that'd normally be freed in
amdgpu_acpi_fini() and amdgpu_device_fini() still hanging around, leading
to all sorts of oopses when someone tries to, for example, access the
sysfs and procfs resources which are still around while the driver is
gone.

Fixes: 4192f7b576 ("drm/amdgpu: unmap register bar on device init failure")
Reported-by: Vojtech Pavlik <vojtech@ucw.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2021-07-01 12:09:19 -04:00
..
amd drm/amdgpu: Fix resource leak on probe error path 2021-07-01 12:09:19 -04:00
arm
armada
aspeed
ast
atmel-hlcdc
bochs
bridge drm/bridge: ti-sn65dsi83: Fix syntax formatting issues 2021-06-08 12:29:31 +02:00
etnaviv Merge branch 'etnaviv/next' of https://git.pengutronix.de/git/lst/linux into drm-next 2021-06-11 13:00:58 +10:00
exynos drm/exynos: use pm_runtime_resume_and_get() 2021-06-11 10:56:38 +09:00
fsl-dcu
gma500
gud
hisilicon drm/hisilicon/kirin: Use the correct HiSilicon copyright 2021-05-26 21:19:28 +02:00
hyperv drm/hyperv: Fix unused const variable 'hyperv_modifiers' 2021-06-15 10:43:35 +02:00
i2c
i810
i915 Merge tag 'drm-intel-gt-next-2021-06-10' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2021-06-11 13:37:34 +10:00
imx
ingenic drm/ingenic: Add option to alloc cached GEM buffers 2021-05-25 11:42:53 +01:00
kmb
lib
lima
mcde Linux 5.13-rc7 2021-06-23 10:07:48 +10:00
mediatek Mediatek DRM Next for Linux 5.14 2021-06-18 10:21:53 +10:00
meson Linux 5.13-rc7 2021-06-23 10:07:48 +10:00
mga
mgag200
msm Merge tag 'drm-msm-next-2021-06-23b' of https://gitlab.freedesktop.org/drm/msm into drm-next 2021-06-24 07:21:16 +10:00
mxsfb
nouveau dma-buf: drop the _rcu postfix on function names v3 2021-06-06 11:19:51 +02:00
omapdrm
panel drm/panel: add rotation support for Elida KD35T133 panels 2021-06-03 15:05:39 +02:00
panfrost dma-buf: drop the _rcu postfix on function names v3 2021-06-06 11:19:51 +02:00
pl111 drm/pl111: Actually fix CONFIG_VEXPRESS_CONFIG depends 2021-06-04 15:02:26 +02:00
qxl drm: qxl: ensure surf.data is ininitialized 2021-06-09 08:52:07 +02:00
r128 drm: fix leaked dma handles after removing drm_pci_free 2021-05-26 21:18:13 +02:00
radeon drm/radeon: Add the missed drm_gem_object_put() in radeon_user_framebuffer_create() 2021-07-01 00:05:18 -04:00
rcar-du
rockchip drm/rockchip: vop: add PX30 version info 2021-05-28 20:30:35 +02:00
savage
scheduler
selftests drm: allow drm_atomic_print_state() to accept any drm_printer 2021-06-23 07:32:13 -07:00
shmobile
sis
sti drm/sti/sti_hqvdp: Fix incorrectly named function 'sti_hqvdp_vtg_cb()' 2021-06-03 13:29:32 +02:00
stm drm/stm: Remove usage of drm_display_mode_to_videomode() 2021-06-08 18:49:36 +02:00
sun4i Linux 5.13-rc7 2021-06-23 10:07:48 +10:00
tdfx
tegra drm/tegra: Changes for v5.14-rc1 2021-06-23 14:24:37 +10:00
tidss
tilcdc
tiny drm/simpledrm: Use %p4cc to print 4CC format 2021-05-27 08:34:30 +02:00
ttm Linux 5.13-rc7 2021-06-23 10:07:48 +10:00
tve200
udl
v3d
vboxvideo drm/vboxvideo/modesetting: Provide function names for prototype headers 2021-06-03 13:33:18 +02:00
vc4 Linux 5.13-rc7 2021-06-23 10:07:48 +10:00
vgem dma-buf: drop the _rcu postfix on function names v3 2021-06-06 11:19:51 +02:00
via
virtio dma-buf: drop the _rcu postfix on function names v3 2021-06-06 11:19:51 +02:00
vkms
vmwgfx drm/vmwgfx: use ttm_bo_move_null() when there is nothing to move 2021-06-09 09:10:22 +02:00
xen
xlnx
zte
drm_agpsupport.c
drm_aperture.c
drm_atomic.c Merge tag 'drm-msm-next-2021-06-23b' of https://gitlab.freedesktop.org/drm/msm into drm-next 2021-06-24 07:21:16 +10:00
drm_atomic_helper.c
drm_atomic_state_helper.c
drm_atomic_uapi.c Merge tag 'drm-msm-next-2021-06-23b' of https://gitlab.freedesktop.org/drm/msm into drm-next 2021-06-24 07:21:16 +10:00
drm_auth.c Linux 5.13-rc7 2021-06-23 10:07:48 +10:00
drm_blend.c
drm_bridge.c
drm_bridge_connector.c
drm_bufs.c drm: fix leaked dma handles after removing drm_pci_free 2021-05-26 21:18:13 +02:00
drm_cache.c drm: Add a prefetching memcpy_from_wc 2021-06-07 16:07:08 +02:00
drm_client.c
drm_client_modeset.c
drm_color_mgmt.c
drm_connector.c
drm_context.c
drm_crtc.c
drm_crtc_helper.c
drm_crtc_helper_internal.h
drm_crtc_internal.h drm: allow drm_atomic_print_state() to accept any drm_printer 2021-06-23 07:32:13 -07:00
drm_damage_helper.c
drm_debugfs.c
drm_debugfs_crc.c
drm_displayid.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.c drm/dp_mst: Add missing drm parameters to recently added call to drm_dbg_kms() 2021-06-16 15:53:15 -04:00
drm_dp_mst_topology_internal.h
drm_drv.c drm: Add a prefetching memcpy_from_wc 2021-06-07 16:07:08 +02:00
drm_dsc.c
drm_dumb_buffers.c
drm_edid.c
drm_edid_load.c
drm_encoder.c
drm_encoder_slave.c
drm_fb_cma_helper.c drm: Add and export function drm_fb_cma_sync_non_coherent 2021-05-25 11:42:09 +01:00
drm_fb_helper.c drm/fb-helper: improve DRM fbdev emulation device names 2021-05-26 21:22:38 +02:00
drm_file.c
drm_flip_work.c
drm_format_helper.c
drm_fourcc.c Merge tag 'amd-drm-next-5.14-2021-06-02' of https://gitlab.freedesktop.org/agd5f/linux into drm-next 2021-06-04 06:13:57 +10:00
drm_framebuffer.c
drm_gem.c dma-buf: drop the _rcu postfix on function names v3 2021-06-06 11:19:51 +02:00
drm_gem_atomic_helper.c dma-buf: rename dma_resv_get_excl_rcu to _unlocked 2021-06-06 11:19:30 +02:00
drm_gem_cma_helper.c drm: Fix misleading documentation of drm_gem_cma_create() 2021-06-01 17:27:20 +01:00
drm_gem_framebuffer_helper.c
drm_gem_shmem_helper.c
drm_gem_ttm_helper.c drm/ttm: rename bo->mem and make it a pointer 2021-06-02 11:07:25 +02:00
drm_gem_vram_helper.c drm/ttm: flip the switch for driver allocated resources v2 2021-06-04 15:16:46 +02:00
drm_hashtab.c
drm_hdcp.c
drm_internal.h
drm_ioc32.c
drm_ioctl.c Linux 5.13-rc7 2021-06-23 10:07:48 +10:00
drm_irq.c
drm_kms_helper_common.c
drm_lease.c
drm_legacy.h
drm_legacy_misc.c
drm_lock.c
drm_managed.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.c
drm_panel_orientation_quirks.c
drm_pci.c
drm_plane.c
drm_plane_helper.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.h
drm_trace_points.c
drm_vblank.c
drm_vblank_work.c
drm_vm.c
drm_vma_manager.c
drm_writeback.c
Kconfig drm/hyperv: Add DRM driver for hyperv synthetic video device 2021-06-07 08:04:10 -07:00
Makefile drm/hyperv: Add DRM driver for hyperv synthetic video device 2021-06-07 08:04:10 -07:00