From: Linus Torvalds Date: Tue, 14 Apr 2026 22:29:55 +0000 (-0700) Subject: Merge tag 'edac_updates_for_v7.1_rc1' of git://git.kernel.org/pub/scm/linux/kernel... X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1834703b8426c92211fd92a0e552fd4ae84dcb71;p=thirdparty%2Fkernel%2Flinux.git Merge tag 'edac_updates_for_v7.1_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras Pull EDAC updates from Borislav Petkov: - amd64_edac: Add support for AMD Zen 3 (family 19h, models 40h–4fh) - i10nm: Add GNR error information decoder support as an alternative to the firmware decoder - versalnet: Restructure the init/teardown logic for correct and more readable error handling. Also, fix two memory leaks and a resource leak - Convert several internal structs to use bounded flex arrays, enabling the kernel's runtime checker to catch out-of-bounds memory accesses - Mark various sysfs attribute tables read-only, preventing accidental modification at runtime - The usual fixes and cleanups across the subsystem * tag 'edac_updates_for_v7.1_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras: EDAC/mc: Use kzalloc_flex() EDAC/ie31200: Make rpl_s_cfg static EDAC/i10nm: Fix spelling mistake "readd" -> "read" EDAC/versalnet: Fix device_node leak in mc_probe() EDAC/versalnet: Fix memory leak in remove and probe error paths EDAC/amd64: Add support for family 19h, models 40h-4fh EDAC/i10nm: Add driver decoder for Granite Rapids server EDAC/sb: Use kzalloc_flex() EDAC/i7core: Use kzalloc_flex() EDAC/mpc85xx: Constify device sysfs attributes EDAC/device: Allow addition of const sysfs attributes EDAC/pci_sysfs: Constify instance sysfs attributes EDAC/device: Constify info sysfs attributes EDAC/device: Drop unnecessary and dangerous casts of attributes EDAC/device: Drop unused macro to_edacdev_attr() EDAC/altera: Drop unused field eccmgr_sysfs_attr EDAC/versalnet: Refactor memory controller initialization and cleanup --- 1834703b8426c92211fd92a0e552fd4ae84dcb71 diff --cc drivers/edac/edac_mc.c index 11d66333d93b4,07d3f73bcd237..fd70caa85574d --- a/drivers/edac/edac_mc.c +++ b/drivers/edac/edac_mc.c @@@ -365,13 -364,9 +364,12 @@@ struct mem_ctl_info *edac_mc_alloc(unsi if (!mci) return NULL; - mci->layers = kzalloc_objs(struct edac_mc_layer, n_layers); - if (!mci->layers) - goto error; + mci->n_layers = n_layers; + memcpy(mci->layers, layers, sizeof(*layer) * n_layers); + mci->dev.release = mci_release; + device_initialize(&mci->dev); + mci->pvt_info = kzalloc(sz_pvt, GFP_KERNEL); if (!mci->pvt_info) goto error;