linux/drivers/thermal/intel
Lee, Chun-Yi 7931e28098 thermal/int340x_thermal: handle data_vault when the value is ZERO_SIZE_PTR
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>
2022-08-23 19:50:43 +02:00
..
int340x_thermal thermal/int340x_thermal: handle data_vault when the value is ZERO_SIZE_PTR 2022-08-23 19:50:43 +02:00
intel_bxt_pmic_thermal.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
intel_hfi.c thermal: intel: hfi: remove NULL check after container_of() call 2022-05-18 20:53:05 +02:00
intel_hfi.h thermal: intel: hfi: Enable notification interrupt 2022-02-03 19:50:49 +01:00
intel_menlow.c thermal/drivers/intel: Move intel_menlow to thermal drivers 2021-08-17 14:11:48 +02:00
intel_pch_thermal.c intel: thermal: PCH: Drop ACPI_FADT_LOW_POWER_S0 check 2022-07-22 21:32:47 +02:00
intel_powerclamp.c thermal: intel_powerclamp: don't use bitmap_weight() in end_power_clamp() 2022-02-04 19:28:03 +01:00
intel_quark_dts_thermal.c thermal: Rename set_mode() to change_mode() 2020-06-29 20:26:39 +02:00
intel_soc_dts_iosf.c thermal/drivers/intel/intel_soc_dts_iosf: Switch to use find_first_zero_bit() 2021-07-04 18:28:04 +02:00
intel_soc_dts_iosf.h thermal: intel: intel_soc_dts_iosf: Utilize for_each_set_clump8 macro 2019-12-04 19:44:12 -08:00
intel_soc_dts_thermal.c thermal: Convert to new X86 CPU match macros 2020-03-24 21:33:53 +01:00
intel_tcc_cooling.c thermal: intel: Add TCC cooling support for Alder Lake-N and Raptor Lake-P 2022-08-03 19:11:38 +02:00
Kconfig thermal: intel: hfi: INTEL_HFI_THERMAL depends on NET 2022-02-10 20:58:24 +01:00
Makefile thermal: intel: hfi: Minimally initialize the Hardware Feedback Interface 2022-02-03 19:50:49 +01:00
therm_throt.c thermal: intel: hfi: Enable notification interrupt 2022-02-03 19:50:49 +01:00
thermal_interrupt.h thermal/drivers/intel: Allow processing of HWP interrupt 2021-09-09 16:33:20 +02:00
x86_pkg_temp_thermal.c thermal: intel: x86_pkg_temp_thermal: Drop duplicate 'is' from comment 2022-07-12 20:23:16 +02:00