kernel_samsung_a53x/drivers/gpu/drm
Antonio Quartulli aa6358430a drm/amdgpu: prevent NULL pointer dereference if ATIF is not supported
commit a6dd15981c03f2cdc9a351a278f09b5479d53d2e upstream.

acpi_evaluate_object() may return AE_NOT_FOUND (failure), which
would result in dereferencing buffer.pointer (obj) while being NULL.

Although this case may be unrealistic for the current code, it is
still better to protect against possible bugs.

Bail out also when status is AE_NOT_FOUND.

This fixes 1 FORWARD_NULL issue reported by Coverity
Report: CID 1600951:  Null pointer dereferences  (FORWARD_NULL)

Signed-off-by: Antonio Quartulli <antonio@mandelbit.com>
Fixes: c9b7c809b89f ("drm/amd: Guard against bad data for ATIF ACPI method")
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20241031152848.4716-1-antonio@mandelbit.com
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 91c9e221fe2553edf2db71627d8453f083de87a1)
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-30 02:33:24 +01:00
..
amd drm/amdgpu: prevent NULL pointer dereference if ATIF is not supported 2024-11-30 02:33:24 +01:00
arc Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
arm Revert "drm: komeda: Fix an issue related to normalized zpos" 2024-11-24 00:23:33 +01:00
armada Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aspeed Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ast Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
atmel-hlcdc Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bochs Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bridge drm/bridge: analogix_dp: properly handle zero sized AUX transactions 2024-11-23 23:20:30 +01:00
etnaviv drm/etnaviv: fix DMA direction handling for cached RW buffers 2024-11-23 23:20:09 +01:00
exynos Revert "drivers:drm:exynos_drm_gsc:Fix wrong assignment in gsc_bind()" 2024-11-24 00:23:24 +01:00
fsl-dcu Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gma500 drm/gma500: fix null pointer dereference in psb_intel_lvds_get_modes 2024-11-23 23:20:12 +01:00
hisilicon Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i2c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i810 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i915 Revert "drm/i915/fence: Mark debug_fence_init_onstack() with __maybe_unused" 2024-11-24 00:23:36 +01:00
imx drm/imx/ipuv3: do not return negative values from .get_modes() 2024-11-19 09:22:36 +01:00
ingenic Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lib Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lima drm/lima: set gp bus_stop bit before hard reset 2024-11-23 23:20:45 +01:00
mcde Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mediatek drm/mediatek: Add 0 size check to mtk_drm_gem_obj 2024-11-19 12:26:57 +01:00
meson drm/meson: plane: Add error handling 2024-11-23 23:20:58 +01:00
mga Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mgag200 drm/mgag200: Set DDC timeout in milliseconds 2024-11-23 23:20:30 +01:00
msm Revert "drm/msm/adreno: Fix error return if missing firmware-name" 2024-11-24 00:23:35 +01:00
mxsfb Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nouveau Revert "nouveau/dmem: Fix vulnerability in migrate_to_ram upon copy error" 2024-11-24 00:22:55 +01:00
omapdrm Revert "drm: omapdrm: Add missing check for alloc_ordered_workqueue" 2024-11-24 00:23:03 +01:00
panel drm/panel: boe-tv101wum-nl6: Check for errors on the NOP in prepare() 2024-11-23 23:20:08 +01:00
panfrost drm/panfrost: Mark simple_ondemand governor as softdep 2024-11-23 23:20:16 +01:00
pl111 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qxl drm/qxl: Add check for drm_cvt_mode 2024-11-23 23:20:09 +01:00
r128 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
radeon Revert "drm/radeon: Replace one-element array with flexible-array member" 2024-11-24 00:23:26 +01:00
rcar-du Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rockchip Revert "drm/rockchip: vop: Allow 4096px width scaling" 2024-11-24 00:23:26 +01:00
samsung Revert "exynos_gpu: Don't allow userspace to control freqs" 2024-11-24 19:22:36 +01:00
savage Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scheduler Revert "drm/sched: Add locking to drm_sched_entity_modify_sched" 2024-11-24 00:23:01 +01:00
selftests Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
shmobile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sis Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sti Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stm Revert "drm/stm: Fix an error handling path in stm_drm_platform_probe()" 2024-11-24 00:23:26 +01:00
sun4i Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tdfx Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tegra drm/tegra: put drm_gem_object ref on error in tegra_fb_create 2024-11-19 08:44:54 +01:00
tidss drm/tidss: Fix initial plane zpos values 2024-11-19 08:44:54 +01:00
tilcdc Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tiny Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ttm drm/vmwgfx: Fix some static checker warnings 2024-11-19 09:22:15 +01:00
tve200 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
udl Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
v3d Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vboxvideo drm/vboxvideo: Replace fake VLA at end of vbva_mouse_pointer_shape with real VLA 2024-11-23 23:22:00 +01:00
vc4 drm: vc4: Fix possible null pointer dereference 2024-11-19 12:26:58 +01:00
vgem Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
via Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
virtio Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vkms Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vmwgfx Revert "drm/vmwgfx: Handle surface check failure correctly" 2024-11-24 00:22:52 +01:00
xen Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xlnx Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
zte Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_agpsupport.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_atomic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_atomic_helper.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_atomic_state_helper.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_atomic_uapi.c Revert "drm: Consistently use struct drm_mode_rect for FB_DAMAGE_CLIPS" 2024-11-24 00:23:04 +01:00
drm_auth.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_blend.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_bridge.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_bridge_connector.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_bufs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_cache.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_client.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_client_modeset.c drm/client: fix null pointer dereference in drm_client_modeset_probe 2024-11-23 23:20:27 +01:00
drm_color_mgmt.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_connector.c drm/connector: Add support for out-of-band hotplug notification (v3) 2024-11-08 11:26:15 +01:00
drm_context.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_crtc.c Revert "drm/crtc: fix uninitialized variable use even harder" 2024-11-24 00:22:59 +01:00
drm_crtc_helper.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_crtc_helper_internal.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_crtc_internal.h drm/connector: Add drm_connector_find_by_fwnode() function (v3) 2024-11-08 11:26:15 +01:00
drm_damage_helper.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_debugfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_debugfs_crc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_dma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_dp_aux_dev.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_dp_cec.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_dp_dual_mode_helper.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_dp_helper.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_dp_mst_topology.c drm/dp_mst: Fix NULL deref in get_mst_branch_device_by_guid_helper() 2024-11-18 10:58:29 +01:00
drm_dp_mst_topology_internal.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_drv.c drm/drv: propagate errors from drm_modeset_register_all() 2024-11-18 12:12:40 +01:00
drm_dsc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_dumb_buffers.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_edid.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_edid_load.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_encoder.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_encoder_slave.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_fb_cma_helper.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_fb_helper.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_file.c drm/drm_file: fix use of uninitialized variable 2024-11-18 12:13:17 +01:00
drm_flip_work.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_format_helper.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_fourcc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_framebuffer.c drm/framebuffer: Fix use of uninitialized variable 2024-11-18 12:13:18 +01:00
drm_gem.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_gem_cma_helper.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_gem_framebuffer_helper.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_gem_shmem_helper.c drm/shmem-helper: Fix BUG_ON() on mmap(PROT_WRITE, MAP_PRIVATE) 2024-11-23 23:22:06 +01:00
drm_gem_ttm_helper.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_gem_vram_helper.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_hashtab.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_hdcp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_internal.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_ioc32.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_ioctl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_irq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_kms_helper_common.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_lease.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_legacy.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_legacy_misc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_lock.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_managed.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_memory.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_mipi_dbi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_mipi_dsi.c Revert "drm/mipi-dsi: Set the fwnode for mipi_dsi_device" 2024-11-23 23:22:06 +01:00
drm_mm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_mode_config.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_mode_object.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_modes.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_modeset_helper.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_modeset_lock.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_of.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_panel.c drm/panel: do not return negative error codes from drm_panel_get_modes() 2024-11-19 09:22:36 +01:00
drm_panel_orientation_quirks.c Revert "drm: panel-orientation-quirks: Add quirk for OrangePi Neo" 2024-11-24 00:23:49 +01:00
drm_pci.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_plane.c drm: Don't unref the same fb many times by mistake due to deadlock handling 2024-11-18 12:13:03 +01:00
drm_plane_helper.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_prime.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_print.c Revert "drm/printer: Allow NULL data in devcoredump printer" 2024-11-24 00:23:06 +01:00
drm_probe_helper.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_property.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_rect.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_scatter.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_scdc_helper.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_self_refresh_helper.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_simple_kms_helper.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_syncobj.c drm/syncobj: call drm_syncobj_fence_add_wait when WAIT_AVAILABLE flag is set 2024-11-18 22:25:42 +01:00
drm_sysfs.c drm/connector: Add a fwnode pointer to drm_connector and register with ACPI (v2) 2024-11-08 11:26:14 +01:00
drm_trace.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_trace_points.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_vblank.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_vblank_work.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_vm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_vma_manager.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm_writeback.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00