milos-linux/drivers/edac
Prasanna Kumar T S M 8cf5dd235e EDAC/versalnet: Fix device name memory leak
The device name allocated via kzalloc() in init_one_mc() is assigned to
dev->init_name but never freed on the normal removal path.  device_register()
copies init_name and then sets dev->init_name to NULL, so the name pointer
becomes unreachable from the device. Thus leaking memory.

Use a stack-local char array instead of using kzalloc() for name.

Fixes: d5fe2fec6c ("EDAC: Add a driver for the AMD Versal NET DDR controller")
Signed-off-by: Prasanna Kumar T S M <ptsm@linux.microsoft.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20260401111856.2342975-1-ptsm@linux.microsoft.com
2026-05-05 14:49:48 +02:00
..
a72_edac.c
al_mc_edac.c
altera_edac.c EDAC/altera: Remove IRQF_ONESHOT 2026-02-01 17:37:15 +01:00
altera_edac.h EDAC/altera: Drop unused field eccmgr_sysfs_attr 2026-03-11 20:46:52 +01:00
amd64_edac.c EDAC/amd64: Add support for family 19h, models 40h-4fh 2026-03-19 19:03:25 +01:00
amd64_edac.h EDAC/amd64: Remove NUM_CONTROLLERS macro 2025-11-06 12:51:33 +01:00
amd76x_edac.c
armada_xp_edac.c
aspeed_edac.c
bluefield_edac.c
cpc925_edac.c
debugfs.c
dmc520_edac.c
e7xxx_edac.c
e752x_edac.c
ecs.c
edac_device.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
edac_device.h EDAC/device: Allow addition of const sysfs attributes 2026-03-11 22:33:38 +01:00
edac_device_sysfs.c EDAC/device: Allow addition of const sysfs attributes 2026-03-11 22:33:38 +01:00
edac_mc.c - amd64_edac: Add support for AMD Zen 3 (family 19h, models 40h–4fh) 2026-04-14 15:29:55 -07:00
edac_mc.h
edac_mc_sysfs.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
edac_module.c
edac_module.h
edac_pci.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
edac_pci.h
edac_pci_sysfs.c EDAC/pci_sysfs: Constify instance sysfs attributes 2026-03-11 22:26:38 +01:00
fsl_ddr_edac.c
fsl_ddr_edac.h
ghes_edac.c EDAC/ghes: Replace deprecated strcpy() in ghes_edac_report_mem_error() 2025-11-18 16:50:32 +01:00
highbank_l2_edac.c
highbank_mc_edac.c
i7core_edac.c EDAC/i7core: Use kzalloc_flex() 2026-03-13 15:03:36 -07:00
i10nm_base.c EDAC/i10nm: Fix spelling mistake "readd" -> "read" 2026-03-25 14:04:06 -07:00
i3000_edac.c
i3200_edac.c EDAC/i3200: Fix a resource leak in i3200_probe1() 2026-01-04 08:31:44 +01:00
i5000_edac.c EDAC/i5000: Fix snprintf() size calculation in calculate_dimm_size() 2025-12-17 09:59:17 -08:00
i5100_edac.c
i5400_edac.c EDAC/i5400: Fix snprintf() limit calculation in calculate_dimm_size() 2025-12-17 10:00:20 -08:00
i7300_edac.c
i82860_edac.c
i82875p_edac.c
i82975x_edac.c
ie31200_edac.c EDAC/ie31200: Make rpl_s_cfg static 2026-03-27 22:20:49 +01:00
igen6_edac.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
imh_base.c Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
Kconfig EDAC/r82600: Remove this obsolete driver 2026-01-30 13:41:32 +01:00
layerscape_edac.c
loongson_edac.c
Makefile EDAC/r82600: Remove this obsolete driver 2026-01-30 13:41:32 +01:00
mce_amd.c x86/mce, EDAC/mce_amd: Add new SMCA bank types 2026-03-11 13:51:59 +01:00
mce_amd.h
mem_repair.c
mpc85xx_edac.c EDAC/mpc85xx: Constify device sysfs attributes 2026-03-11 22:34:07 +01:00
mpc85xx_edac.h
npcm_edac.c
octeon_edac-l2c.c
octeon_edac-lmc.c
octeon_edac-pc.c
octeon_edac-pci.c
pasemi_edac.c
pnd2_edac.c
pnd2_edac.h
qcom_edac.c
sb_edac.c EDAC/sb: Use kzalloc_flex() 2026-03-13 15:04:33 -07:00
scrub.c
sifive_edac.c
skx_base.c EDAC/{skx_common,skx,i10nm}: Make skx_register_mci() independent of pci_dev 2025-11-19 12:11:40 -08:00
skx_common.c Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
skx_common.h EDAC/{skx_comm,imh}: Detect 2-level memory configuration 2025-11-21 10:20:51 -08:00
synopsys_edac.c
thunderx_edac.c
ti_edac.c
versal_edac.c
versalnet_edac.c EDAC/versalnet: Fix device name memory leak 2026-05-05 14:49:48 +02:00
wq.c
x38_edac.c EDAC/x38: Fix a resource leak in x38_probe1() 2026-01-04 08:35:39 +01:00
xgene_edac.c
zynqmp_edac.c