milos-linux/drivers/firmware
Krzysztof Kozlowski db7bb080de firmware: exynos-acpm: Drop fake 'const' on handle pointer
commit a2be37eedb upstream.

All the functions operating on the 'handle' pointer are claiming it is a
pointer to const thus they should not modify the handle.  In fact that's
a false statement, because first thing these functions do is drop the
cast to const with container_of:

  struct acpm_info *acpm = handle_to_acpm_info(handle);

And with such cast the handle is easily writable with simple:

  acpm->handle.ops.pmic_ops.read_reg = NULL;

The code is not correct logically, either, because functions like
acpm_get_by_node() and acpm_handle_put() are meant to modify the handle
reference counting, thus they must modify the handle.  Modification here
happens anyway, even if the reference counting is stored in the
container which the handle is part of.

The code does not have actual visible bug, but incorrect 'const'
annotations could lead to incorrect compiler decisions.

Fixes: a88927b534 ("firmware: add Exynos ACPM protocol driver")
Cc: stable@vger.kernel.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260224104203.42950-2-krzysztof.kozlowski@oss.qualcomm.com
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-05-07 06:14:02 +02:00
..
arm_ffa firmware: arm_ffa: Remove vm_id argument in ffa_rxtx_unmap() 2026-03-06 16:26:08 +00:00
arm_scmi firmware: arm_scmi: Spelling s/mulit/multi/, s/currenly/currently/ 2026-03-08 13:00:15 +00:00
broadcom mm.git review status for linus..mm-nonmm-stable 2026-02-12 12:13:01 -08:00
cirrus firmware: cs_dsp: Fix fragmentation regression in firmware download 2026-03-09 00:16:52 +00:00
efi firmware: efi: Never declare sysfb_primary_display on x86 2026-04-08 16:09:11 +02:00
google firmware: google: framebuffer: Do not unregister platform device 2026-05-07 06:14:02 +02:00
imx firmware: imx: sm-misc: Dump syslog info 2026-01-17 10:32:21 +08:00
meson
microchip RISC-V soc fixes for v7.0-rc6 2026-04-01 13:42:51 +02:00
psci Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
qcom Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
samsung firmware: exynos-acpm: Drop fake 'const' on handle pointer 2026-05-07 06:14:02 +02:00
smccc Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
tegra
xilinx treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
arm_scpi.c firmware: arm_scpi: Fix device_node reference leak in probe path 2026-03-07 19:49:52 +00:00
arm_sdei.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dmi-id.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dmi-sysfs.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dmi_scan.c
edd.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
iscsi_ibft.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
iscsi_ibft_find.c
Kconfig
Makefile
memmap.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
mtk-adsp-ipc.c
qemu_fw_cfg.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
raspberrypi.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
stratix10-rsu.c firmware: stratix10-rsu: Fix NULL pointer dereference when RSU is disabled 2026-02-24 21:40:06 -06:00
stratix10-svc.c firmware: stratix10-svc: Add Multi SVC clients support 2026-03-10 11:32:31 -05:00
sysfb.c sysfb: Pass sysfb_primary_display to devices 2025-12-16 14:12:44 +01:00
sysfb_simplefb.c efi: sysfb_efi: Reduce number of references to global screen_info 2025-12-16 14:12:44 +01:00
thead,th1520-aon.c firmware: thead: Fix buffer overflow and use standard endian macros 2026-04-01 13:03:07 +02:00
ti_sci.c firmware: ti_sci: Partial-IO support 2025-11-13 13:03:55 -06:00
ti_sci.h firmware: ti_sci.h: fix all kernel-doc warnings 2025-12-15 07:16:51 -06:00
trusted_foundations.c
turris-mox-rwtm.c