android_kernel_samsung_sm8650/drivers/nvdimm
Konstantin Meskhidze ab8094db59 nvdimm: Fix dereference after free in register_nvdimm_pmu()
[ Upstream commit 08ca6906a4b7e48f8e93b7c1f49a742a415be6d5 ]

'nd_pmu->pmu.attr_groups' is dereferenced in function
'nvdimm_pmu_free_hotplug_memory' call after it has been freed. Because in
function 'nvdimm_pmu_free_hotplug_memory' memory pointed by the fields of
'nd_pmu->pmu.attr_groups' is deallocated it is necessary to call 'kfree'
after 'nvdimm_pmu_free_hotplug_memory'.

Fixes: 0fab1ba6ad ("drivers/nvdimm: Add perf interface to expose nvdimm performance stats")
Co-developed-by: Ivanov Mikhail <ivanov.mikhail1@huawei-partners.com>
Signed-off-by: Konstantin Meskhidze <konstantin.meskhidze@huawei.com>
Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
Link: https://lore.kernel.org/r/20230817114103.754977-1-konstantin.meskhidze@huawei.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-13 09:42:47 +02:00
..
badrange.c
btt_devs.c nvdimm: Drop nd_device_lock() 2022-04-28 14:01:55 -07:00
btt.c nvdimm-btt: Use the enum req_op type 2022-07-14 12:14:31 -06:00
btt.h
bus.c cxl/pmem: Fix nvdimm registration races 2023-03-10 09:34:20 +01:00
claim.c
core.c nvdimm: Fix firmware activation deadlock scenarios 2022-04-28 14:01:56 -07:00
dax_devs.c nvdimm: Replace lockdep_mutex with local lock classes 2022-04-28 14:01:55 -07:00
dimm_devs.c cxl/pmem: Fix nvdimm registration races 2023-03-10 09:34:20 +01:00
dimm.c
e820.c
Kconfig nvdimm: Support sizeof(struct page) > MAX_STRUCT_PAGE_SIZE 2023-02-14 19:11:53 +01:00
label.c nvdimm/region: Delete nd_blk_region infrastructure 2022-03-11 15:53:13 -08:00
label.h nvdimm/region: Delete nd_blk_region infrastructure 2022-03-11 15:53:13 -08:00
Makefile drivers/nvdimm: Fix build failure when CONFIG_PERF_EVENTS is not set 2022-03-23 12:17:36 -07:00
namespace_devs.c libnvdimm for 6.1 2022-10-14 18:41:41 -07:00
nd_perf.c nvdimm: Fix dereference after free in register_nvdimm_pmu() 2023-09-13 09:42:47 +02:00
nd_virtio.c block: pass a block_device and opf to bio_alloc 2022-02-02 07:49:59 -07:00
nd-core.h cxl/pmem: Fix nvdimm registration races 2023-03-10 09:34:20 +01:00
nd.h nvdimm: Support sizeof(struct page) > MAX_STRUCT_PAGE_SIZE 2023-02-14 19:11:53 +01:00
of_pmem.c
pfn_devs.c nvdimm: Support sizeof(struct page) > MAX_STRUCT_PAGE_SIZE 2023-02-14 19:11:53 +01:00
pfn.h
pmem.c Merge branch 'for-6.0/dax' into libnvdimm-fixes 2022-09-24 18:14:12 -07:00
pmem.h dax: introduce DAX_RECOVERY_WRITE dax access mode 2022-05-16 13:35:56 -07:00
region_devs.c libnvdimm/region: Allow setting align attribute on regions without mappings 2022-09-29 17:22:30 -07:00
region.c nvdimm: Drop nd_device_lock() 2022-04-28 14:01:55 -07:00
security.c nvdimm: make __nvdimm_security_overwrite_query static 2022-09-20 10:23:52 -07:00
virtio_pmem.c virtio_pmem: set device ready in probe() 2022-08-11 04:06:37 -04:00
virtio_pmem.h