aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/intel/pmt/class.c
diff options
context:
space:
mode:
authorDavid E. Box <[email protected]>2023-11-29 22:21:13 +0000
committerHans de Goede <[email protected]>2023-12-04 13:10:40 +0000
commit8cbcc1dbf8a62c730fadd60de761e0658547a589 (patch)
tree93f38930162cba64b669a50d6dd8ca45e3a38031 /drivers/platform/x86/intel/pmt/class.c
parentplatform/x86: Add Silicom Platform Driver (diff)
downloadkernel-8cbcc1dbf8a62c730fadd60de761e0658547a589.tar.gz
kernel-8cbcc1dbf8a62c730fadd60de761e0658547a589.zip
platform/x86/intel/vsec: Fix xa_alloc memory leak
Commit 936874b77dd0 ("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: 936874b77dd0 ("platform/x86/intel/vsec: Add PCI error recovery support to Intel PMT") Signed-off-by: David E. Box <[email protected]> Reviewed-by: Ilpo Järvinen <[email protected]> Link: https://lore.kernel.org/r/[email protected] [[email protected]: Add missing xa_erase() on error-exit Signed-off-by: Hans de Goede <[email protected]>
Diffstat (limited to 'drivers/platform/x86/intel/pmt/class.c')
0 files changed, 0 insertions, 0 deletions