linux-yocto/drivers/thermal
Lee, Chun-Yi 39d5137085 thermal/int340x_thermal: handle data_vault when the value is ZERO_SIZE_PTR
commit 7931e28098 upstream.

In some case, the GDDV returns a package with a buffer which has
zero length. It causes that kmemdup() returns ZERO_SIZE_PTR (0x10).

Then the data_vault_read() got NULL point dereference problem when
accessing the 0x10 value in data_vault.

[   71.024560] BUG: kernel NULL pointer dereference, address:
0000000000000010

This patch uses ZERO_OR_NULL_PTR() for checking ZERO_SIZE_PTR or
NULL value in data_vault.

Signed-off-by: "Lee, Chun-Yi" <jlee@suse.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
[ Larry: backport to 5.15.y. Minor conflict resolved due to missing commit 9e5d3d6be6
  thermal: int340x: Consolidate freeing of acpi_buffer pointer ]
Signed-off-by: Larry Bassel <larry.bassel@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-07-17 18:30:48 +02:00
..
broadcom
intel thermal/int340x_thermal: handle data_vault when the value is ZERO_SIZE_PTR 2025-07-17 18:30:48 +02:00
qcom thermal/drivers/qcom/tsens: Update conditions to strictly evaluate for IP v2+ 2025-06-27 11:05:30 +01:00
samsung
st
tegra
ti-soc-thermal
amlogic_thermal.c
armada_thermal.c
cpufreq_cooling.c thermal/cpufreq_cooling: Remove structure member documentation 2025-04-10 14:31:50 +02:00
cpuidle_cooling.c
da9062-thermal.c
db8500_thermal.c
devfreq_cooling.c
dove_thermal.c
gov_bang_bang.c
gov_fair_share.c
gov_power_allocator.c
gov_step_wise.c
gov_user_space.c
hisi_thermal.c
imx_sc_thermal.c
imx_thermal.c
imx8mm_thermal.c
k3_bandgap.c
Kconfig
khadas_mcu_fan.c
kirkwood_thermal.c
Makefile
max77620_thermal.c
mtk_thermal.c
qoriq_thermal.c thermal/drivers/qoriq: Power down TMU on system suspend 2025-06-04 14:37:55 +02:00
rcar_gen3_thermal.c
rcar_thermal.c
rockchip_thermal.c thermal/drivers/rockchip: Add missing rk3328 mapping entry 2025-05-02 07:44:05 +02:00
spear_thermal.c
sprd_thermal.c
sun8i_thermal.c
thermal_core.c thermal: core: Initialize thermal zones before registering them 2024-12-14 19:50:44 +01:00
thermal_core.h
thermal_helpers.c
thermal_hwmon.c
thermal_hwmon.h
thermal_mmio.c
thermal_netlink.c
thermal_netlink.h
thermal_of.c
thermal_sysfs.c
thermal-generic-adc.c
uniphier_thermal.c