summaryrefslogtreecommitdiffstats
path: root/lib/debug_info.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2022-11-03 17:30:36 -0700
committerDan Williams <dan.j.williams@intel.com>2022-11-04 15:58:35 -0700
commit4d07ae22e79ebc2d7528bbc69daa53b86981cb3a (patch)
tree1464e53baab41aaddac96f01b399a4b1b43fee0d /lib/debug_info.c
parent0d9e734018d70cecf79e2e4c6082167160a0f13f (diff)
downloadlinux-4d07ae22e79ebc2d7528bbc69daa53b86981cb3a.tar.bz2
cxl/pmem: Fix cxl_pmem_region and cxl_memdev leak
When a cxl_nvdimm object goes through a ->remove() event (device physically removed, nvdimm-bridge disabled, or nvdimm device disabled), then any associated regions must also be disabled. As highlighted by the cxl-create-region.sh test [1], a single device may host multiple regions, but the driver was only tracking one region at a time. This leads to a situation where only the last enabled region per nvdimm device is cleaned up properly. Other regions are leaked, and this also causes cxl_memdev reference leaks. Fix the tracking by allowing cxl_nvdimm objects to track multiple region associations. Cc: <stable@vger.kernel.org> Link: https://github.com/pmem/ndctl/blob/main/test/cxl-create-region.sh [1] Reported-by: Vishal Verma <vishal.l.verma@intel.com> Fixes: 04ad63f086d1 ("cxl/region: Introduce cxl_pmem_region objects") Reviewed-by: Dave Jiang <dave.jiang@intel.com> Reviewed-by: Vishal Verma <vishal.l.verma@intel.com> Link: https://lore.kernel.org/r/166752183647.947915.2045230911503793901.stgit@dwillia2-xfh.jf.intel.com Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'lib/debug_info.c')
0 files changed, 0 insertions, 0 deletions