<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/drivers/edac, branch master</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=master</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2026-04-14T22:32:39+00:00</updated>
<entry>
<title>Merge tag 'ras_core_for_v7.1_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2026-04-14T22:32:39+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-04-14T22:32:39+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=508fed6795411f5ab277fd1edc0d7adca4946f23'/>
<id>urn:sha1:508fed6795411f5ab277fd1edc0d7adca4946f23</id>
<content type='text'>
Pull RAS updates from Borislav Petkov:

 - Add new AMD MCA bank names and types to the MCA code, preceded by a
   clean up of the relevant places to have them more developer-friendly
   (read: sort them alphanumerically and clean up comments) such that
   adding new banks is easy

* tag 'ras_core_for_v7.1_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/mce, EDAC/mce_amd: Add new SMCA bank types
  x86/mce, EDAC/mce_amd: Update CS bank type naming
  x86/mce, EDAC/mce_amd: Reorder SMCA bank type enums
</content>
</entry>
<entry>
<title>Merge tag 'edac_updates_for_v7.1_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras</title>
<updated>2026-04-14T22:29:55+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-04-14T22:29:55+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=1834703b8426c92211fd92a0e552fd4ae84dcb71'/>
<id>urn:sha1:1834703b8426c92211fd92a0e552fd4ae84dcb71</id>
<content type='text'>
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" -&gt; "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
</content>
</entry>
<entry>
<title>Merge remote-tracking branches 'ras/edac-misc' and 'ras/edac-drivers' into edac-updates</title>
<updated>2026-04-13T09:43:52+00:00</updated>
<author>
<name>Borislav Petkov (AMD)</name>
<email>bp@alien8.de</email>
</author>
<published>2026-04-13T09:43:52+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=4db9a9841dc1060e8805a4c40bdd7e6058d45100'/>
<id>urn:sha1:4db9a9841dc1060e8805a4c40bdd7e6058d45100</id>
<content type='text'>
* ras/edac-misc:
  EDAC/mc: Use kzalloc_flex()
  EDAC/ie31200: Make rpl_s_cfg static
  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

* ras/edac-drivers:
  EDAC/i10nm: Fix spelling mistake "readd" -&gt; "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/versalnet: Refactor memory controller initialization and cleanup

Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
</content>
</entry>
<entry>
<title>EDAC/mc: Fix error path ordering in edac_mc_alloc()</title>
<updated>2026-04-05T15:49:19+00:00</updated>
<author>
<name>Borislav Petkov (AMD)</name>
<email>bp@alien8.de</email>
</author>
<published>2026-03-31T12:16:23+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=51520e03e70d6c73e33ee7cbe0319767d05764fe'/>
<id>urn:sha1:51520e03e70d6c73e33ee7cbe0319767d05764fe</id>
<content type='text'>
When the mci-&gt;pvt_info allocation in edac_mc_alloc() fails, the error path
will call put_device() which will end up calling the device's release
function.

However, the init ordering is wrong such that device_initialize() happens
*after* the failed allocation and thus the device itself and the release
function pointer are not initialized yet when they're called:

  MCE: In-kernel MCE decoding enabled.
  ------------[ cut here ]------------
  kobject: '(null)': is not initialized, yet kobject_put() is being called.
  WARNING: lib/kobject.c:734 at kobject_put, CPU#22: systemd-udevd
  CPU: 22 UID: 0 PID: 538 Comm: systemd-udevd Not tainted 7.0.0-rc1+ #2 PREEMPT(full)
  RIP: 0010:kobject_put
  Call Trace:
   &lt;TASK&gt;
   edac_mc_alloc+0xbe/0xe0 [edac_core]
   amd64_edac_init+0x7a4/0xff0 [amd64_edac]
   ? __pfx_amd64_edac_init+0x10/0x10 [amd64_edac]
   do_one_initcall
   ...

Reorder the calling sequence so that the device is initialized and thus the
release function pointer is properly set before it can be used.

This was found by Claude while reviewing another EDAC patch.

Fixes: 0bbb265f7089 ("EDAC/mc: Get rid of silly one-shot struct allocation in edac_mc_alloc()")
Reported-by: Claude Code:claude-opus-4.5
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Reviewed-by: Qiuxu Zhuo &lt;qiuxu.zhuo@intel.com&gt;
Cc: stable@kernel.org
Link: https://patch.msgid.link/20260331121623.4871-1-bp@kernel.org
</content>
</entry>
<entry>
<title>EDAC/mc: Use kzalloc_flex()</title>
<updated>2026-03-31T17:15:21+00:00</updated>
<author>
<name>Rosen Penev</name>
<email>rosenp@gmail.com</email>
</author>
<published>2026-03-27T02:48:28+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=62ba6d66b22356a6a78fd015c37fd108710dfc32'/>
<id>urn:sha1:62ba6d66b22356a6a78fd015c37fd108710dfc32</id>
<content type='text'>
Convert struct mem_ctl_info to use flex array and use the new flex array
helpers to enable runtime bounds checking, including annotating the array
length member with __counted_by() for extra runtime analysis when requested.

Move memcpy() after the counter assignment so that it is initialized before
the first reference to the flex array, as the new attribute requires.

  [ bp: Heavily massage commit message. ]

Signed-off-by: Rosen Penev &lt;rosenp@gmail.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Reviewed-by: Yazen Ghannam &lt;yazen.ghannam@amd.com&gt;
Reviewed-by: Qiuxu Zhuo &lt;qiuxu.zhuo@intel.com&gt;
Link: https://patch.msgid.link/20260327024828.7377-1-rosenp@gmail.com
</content>
</entry>
<entry>
<title>EDAC/ie31200: Make rpl_s_cfg static</title>
<updated>2026-03-27T21:20:49+00:00</updated>
<author>
<name>Marilene Andrade Garcia</name>
<email>marilene.agarcia@gmail.com</email>
</author>
<published>2026-03-27T14:55:57+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=489b33708eda8b5f6a0cddb5a4964b56c12f52e2'/>
<id>urn:sha1:489b33708eda8b5f6a0cddb5a4964b56c12f52e2</id>
<content type='text'>
The rpl_s_cfg variable is only used within this file, so mark it static, as
Sparse reports:

  drivers/edac/ie31200_edac.c:709:19: warning: symbol 'rpl_s_cfg' was not
  declared. Should it be static?

  [ bp: Massage commit message. ]

Signed-off-by: Marilene Andrade Garcia &lt;marilene.agarcia@gmail.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Link: https://patch.msgid.link/f353c3aff47abd88bafc46a1c0c5eb9917e11b28.1774619301.git.marilene.agarcia@gmail.com
</content>
</entry>
<entry>
<title>EDAC/i10nm: Fix spelling mistake "readd" -&gt; "read"</title>
<updated>2026-03-25T21:04:06+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.i.king@gmail.com</email>
</author>
<published>2026-03-25T20:35:55+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=865867a6652adeae23b64a9735bb727b49eb92a0'/>
<id>urn:sha1:865867a6652adeae23b64a9735bb727b49eb92a0</id>
<content type='text'>
There is a spelling mistake in a i10nm_printk error message. Fix it.

Signed-off-by: Colin Ian King &lt;colin.i.king@gmail.com&gt;
Signed-off-by: Tony Luck &lt;tony.luck@intel.com&gt;
Link: https://patch.msgid.link/20260325203556.1228975-1-colin.i.king@gmail.com
</content>
</entry>
<entry>
<title>EDAC/versalnet: Fix device_node leak in mc_probe()</title>
<updated>2026-03-24T14:51:50+00:00</updated>
<author>
<name>Felix Gu</name>
<email>ustc.gu@gmail.com</email>
</author>
<published>2026-03-22T16:04:08+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=5c709b376460ff322580c41600e31c02f7cc0307'/>
<id>urn:sha1:5c709b376460ff322580c41600e31c02f7cc0307</id>
<content type='text'>
of_parse_phandle() returns a device_node reference that must be released with
of_node_put(). The original code never freed r5_core_node on any exit path,
causing a memory leak.

Fix this by using the automatic cleanup attribute __free(device_node) which
ensures of_node_put() is called when the variable goes out of scope.

Fixes: d5fe2fec6c40 ("EDAC: Add a driver for the AMD Versal NET DDR controller")
Signed-off-by: Felix Gu &lt;ustc.gu@gmail.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Reviewed-by: Shubhrajyoti Datta &lt;shubhrajyoti.datta@amd.com&gt;
Cc: &lt;stable@kernel.org&gt;
Link: https://patch.msgid.link/20260323-versalnet-v1-1-4ab3012635ef@gmail.com
</content>
</entry>
<entry>
<title>EDAC/versalnet: Fix memory leak in remove and probe error paths</title>
<updated>2026-03-22T18:39:34+00:00</updated>
<author>
<name>Prasanna Kumar T S M</name>
<email>ptsm@linux.microsoft.com</email>
</author>
<published>2026-03-22T13:11:39+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=1b6f292cb94d95c9bc22e1efe592daf62c60bc2e'/>
<id>urn:sha1:1b6f292cb94d95c9bc22e1efe592daf62c60bc2e</id>
<content type='text'>
The mcdi object allocated using kzalloc() in the setup_mcdi() is not freed in
the remove path or in probe's error handling path leading to a memory leak.
Fix it by freeing the allocated memory.

Fixes: d5fe2fec6c40d ("EDAC: Add a driver for the AMD Versal NET DDR controller")
Signed-off-by: Prasanna Kumar T S M &lt;ptsm@linux.microsoft.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20260322131139.1684716-1-ptsm@linux.microsoft.com
</content>
</entry>
<entry>
<title>EDAC/amd64: Add support for family 19h, models 40h-4fh</title>
<updated>2026-03-19T18:03:25+00:00</updated>
<author>
<name>Devang Vyas</name>
<email>devangnayanbhai.vyas@amd.com</email>
</author>
<published>2026-03-17T18:34:53+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=fbe230a9a79b62be3c6ac55b24d53ce5dd9202d5'/>
<id>urn:sha1:fbe230a9a79b62be3c6ac55b24d53ce5dd9202d5</id>
<content type='text'>
Add support for Ryzen 6000 Zen3-based CPUs in the V3000 AMD Embedded SoC
platform which uses ECC memory and would need RAS handling of hardware errors.

Co-developed-by: Ramesh Garidapuri &lt;ramesh.garidapuri@amd.com&gt;
Signed-off-by: Ramesh Garidapuri &lt;ramesh.garidapuri@amd.com&gt;
Signed-off-by: Devang Vyas &lt;devangnayanbhai.vyas@amd.com&gt;
Signed-off-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Reviewed-by: Yazen Ghannam &lt;yazen.ghannam@amd.com&gt;
Link: https://patch.msgid.link/20260317183453.3556588-1-devangnayanbhai.vyas@amd.com
</content>
</entry>
</feed>
