Commit 500a6ff9 authored by Konstantin Meskhidze's avatar Konstantin Meskhidze Committed by Greg Kroah-Hartman
Browse files

nvdimm: Fix memleak of pmu attr_groups in unregister_nvdimm_pmu()



[ Upstream commit 85ae42c7 ]

Memory pointed by 'nd_pmu->pmu.attr_groups' is allocated in function
'register_nvdimm_pmu' and is lost after 'kfree(nd_pmu)' call in function
'unregister_nvdimm_pmu'.

Fixes: 0fab1ba6 ("drivers/nvdimm: Add perf interface to expose nvdimm performance stats")
Co-developed-by: default avatarIvanov Mikhail <ivanov.mikhail1@huawei-partners.com>
Signed-off-by: default avatarKonstantin Meskhidze <konstantin.meskhidze@huawei.com>
Reviewed-by: default avatarJeff Moyer <jmoyer@redhat.com>
Link: https://lore.kernel.org/r/20230817115945.771826-1-konstantin.meskhidze@huawei.com


Signed-off-by: default avatarDave Jiang <dave.jiang@intel.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent f6f300ec
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment