]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Merge tag 'edac_updates_for_v7.1_rc1' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 14 Apr 2026 22:29:55 +0000 (15:29 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 14 Apr 2026 22:29:55 +0000 (15:29 -0700)
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

1  2 
drivers/edac/edac_mc.c

index 11d66333d93b435a389617632149f820f9ee49ec,07d3f73bcd237b45ed75bb4d89fc87976d8cffdc..fd70caa85574d791442b414e2f1f2f2de4d2cc6f
@@@ -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;