summaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/intel/pmt/class.c
diff options
context:
space:
mode:
authorDavid E. Box <david.e.box@linux.intel.com>2023-11-29 14:21:13 -0800
committerHans de Goede <hdegoede@redhat.com>2023-12-04 14:10:40 +0100
commit8cbcc1dbf8a62c730fadd60de761e0658547a589 (patch)
tree93f38930162cba64b669a50d6dd8ca45e3a38031 /drivers/platform/x86/intel/pmt/class.c
parentd9cd21d441c8c7c22ef448d23f1d6f5fa698b7f0 (diff)
downloadlinux-8cbcc1dbf8a62c730fadd60de761e0658547a589.tar.gz
linux-8cbcc1dbf8a62c730fadd60de761e0658547a589.tar.bz2
linux-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 <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>
Diffstat (limited to 'drivers/platform/x86/intel/pmt/class.c')
0 files changed, 0 insertions, 0 deletions