linux/drivers/platform/x86/intel
David E. Box 8271d397a9 platform/x86/intel/vsec: Fix xa_alloc memory leak
[ Upstream commit 8cbcc1dbf8 ]

Commit 936874b77d ("platform/x86/intel/vsec: Add PCI error recovery
support to Intel PMT") added an xarray to track the list of vsec devices to
be recovered after a PCI error. But it did not provide cleanup for the list
leading to a memory leak that was caught by kmemleak.  Do xa_alloc() before
devm_add_action_or_reset() so that the list may be cleaned up with
xa_erase() in the release function.

Fixes: 936874b77d ("platform/x86/intel/vsec: Add PCI error recovery support to Intel PMT")
Signed-off-by: David E. Box <david.e.box@linux.intel.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20231129222132.2331261-2-david.e.box@linux.intel.com
[hdegoede@redhat.com: Add missing xa_erase() on error-exit
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2024-01-25 15:35:14 -08:00
..
atomisp2 platform/x86: intel_atomisp2_led: Also turn off the always-on camera LED on the Asus T100TAF 2022-07-10 19:37:19 +02:00
ifs platform/x86/intel/ifs: release cpus_read_lock() 2023-10-04 11:52:44 +02:00
int1092 platform/x86: intel: int1092: intel_sar: Convert to platform remove callback returning void 2023-03-07 12:20:31 +01:00
int3472 platform/x86: int3472/discrete: set variable skl_int3472_regulator_second_sensor storage-class-specifier to static 2023-07-10 15:26:07 +02:00
pmc platform/x86/intel/pmc: Move GBE LTR ignore to suspend callback 2024-01-05 15:19:42 +01:00
pmt Driver core changes for 6.4-rc1 2023-04-27 11:53:57 -07:00
speed_select_if Perf events changes for v6.6: 2023-08-28 16:35:01 -07:00
telemetry platform/x86: intel_telemetry: Fix kernel doc descriptions 2023-12-20 17:01:58 +01:00
uncore-frequency platform/x86: intel-uncore-freq: Conditionally create attribute for read frequency 2023-10-11 11:20:16 +02:00
wmi platform/x86/intel/wmi: thunderbolt: Use dev_groups callback 2022-09-27 16:01:44 +02:00
bxtwc_tmu.c platform/x86: intel: bxtwc_tmu: Convert to platform remove callback returning void 2023-03-07 12:20:21 +01:00
bytcrc_pwrsrc.c platform/x86: Add intel_bytcrc_pwrsrc driver 2023-03-16 14:42:30 +01:00
chtdc_ti_pwrbtn.c platform/x86: intel: chtdc_ti_pwrbtn: Convert to platform remove callback returning void 2023-03-07 12:20:23 +01:00
chtwc_int33fe.c platform/x86: intel: chtwc_int33fe: Convert to platform remove callback returning void 2023-03-07 12:20:25 +01:00
crystal_cove_charger.c platform/x86: intel_crystal_cove_charger: Fix IRQ masking / unmasking 2022-01-24 10:41:46 +01:00
hid.c platform/x86/intel/hid: Add HP Dragonfly G2 to VGBS DMI quirks 2023-07-25 15:30:33 +02:00
int0002_vgpio.c platform/x86: intel: int0002_vgpio: Convert to platform remove callback returning void 2023-03-07 12:20:29 +01:00
ishtp_eclite.c HID: intel-ish-hid: fix module device-id handling 2021-11-11 22:45:40 +01:00
Kconfig platform/x86: Add intel_bytcrc_pwrsrc driver 2023-03-16 14:42:30 +01:00
Makefile platform/x86: Add intel_bytcrc_pwrsrc driver 2023-03-16 14:42:30 +01:00
mrfld_pwrbtn.c platform/x86: intel: mrfld_pwrbtn: Convert to platform remove callback returning void 2023-03-07 12:20:35 +01:00
oaktrail.c platform/x86: intel: oaktrail: Drop empty platform remove function 2023-02-02 22:48:20 +01:00
punit_ipc.c platform/x86: intel: punit_ipc: Drop empty platform remove function 2023-02-02 22:48:20 +01:00
rst.c ACPI: make remove callback of ACPI driver void 2022-11-23 19:11:22 +01:00
sdsi.c platform/x86/intel/sdsi: Change mailbox timeout 2023-04-17 12:12:29 +02:00
smartconnect.c platform/x86: intel-smartconnect: Move to intel sub-directory 2021-08-20 20:11:12 +02:00
tpmi.c Merge remote-tracking branch 'pdx86/fixes' into pdx86/for-next 2023-08-23 17:30:50 +02:00
turbo_max_3.c platform/x86: intel_turbo_max_3: Move to intel sub-directory 2021-08-20 20:11:22 +02:00
vbtn.c platform/x86: intel-vbtn: Fix missing tablet-mode-switch events 2024-01-20 11:51:43 +01:00
vsec.c platform/x86/intel/vsec: Fix xa_alloc memory leak 2024-01-25 15:35:14 -08:00
vsec.h platform/x86/intel/vsec: Fix xa_alloc memory leak 2024-01-25 15:35:14 -08:00