Skip to content

Draft: CVE-2024-38391: cxl/region: Fix cxlr_pmem leaks

JIRA: https://issues.redhat.com/browse/RHEL-44484
CVE: CVE-2024-38391

cxl/region: Fix cxlr_pmem leaks

Before this error path, cxlr_pmem pointed to a kzalloc() memory, free
it to avoid this memory leaking.

Fixes: f17b558d6663 ("cxl/pmem: Refactor nvdimm device registration, delete the workqueue")
Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20240428030748.318985-1-lizhijian@fujitsu.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
(cherry picked from commit 1c987cf22d6b65ade46145c03eef13f0e3e81d83)

Signed-off-by: cki-backport-bot cki-ci-bot+cki-gitlab-backport-bot@redhat.com

Merge request reports