All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/12] EDAC/versalnet: Fix error handling, teardown, and robustness
@ 2026-11-18 14:20 Shubhrajyoti Datta
  2026-11-18 14:20 ` [PATCH v2 01/12] EDAC/versalnet: Fix device_register() error handling in init_one_mc() Shubhrajyoti Datta
                   ` (11 more replies)
  0 siblings, 12 replies; 19+ messages in thread
From: Shubhrajyoti Datta @ 2026-11-18 14:20 UTC (permalink / raw)
  To: linux-edac
  Cc: git, shubhrajyoti.datta, michal.simek, Shubhrajyoti Datta,
	Radhey Shyam Pandey, Krzysztof Kozlowski, Rob Herring,
	Conor Dooley, Borislav Petkov, Tony Luck, linux-kernel,
	devicetree

This series addresses several correctness and robustness issues in
the VersalNet EDAC driver, including NULL pointer dereferences,
resource lifetime problems, shutdown handling, and probe/remove
path cleanup.

The main fixes are:

* Robustness fixes
  - Add bounds validation in rpmsg_cb().

* Probe and initialization cleanup
  - Move platform_set_drvdata() from init_one_mc() to mc_probe().
  - Reorder probe flow to initialize MCDI before RPMsg registration.
  - Remove unused pdev parameters from internal initialization
    functions.

* Resource management fixes
  - Fix error handling in init_one_mc() to avoid a potential
    double-free by reordering device_register() and edac_mc_alloc().
  - Replace sprintf() with init_name by dev_set_name() to avoid
    use-after-free issues caused by deferred kobject cleanup.

* Code cleanup
  - Use a designated initializer for rpmsg_channel_info.


Changes in v2:
Add the codeveloped tag and remove the non standard signature
fix the name stack warning
Use a macro for channel name
Add reviewed by tag
Sashiko comment
"This is a pre-existing issue, but are offset and length validated before
being used as indices?"
New patch to fix shashiko review comment "this is a pre-existing
issue, but is the per-controller width overwriting the shared
state for all controllers?".
Patch addition for the rpmsg endpoint race
Update the labels
Address the sashiko comment
"register_rpmsg_driver() exposes the callback endpoint before setup_mcdi()
initializes the mcdi pointer. Could this lead to a NULL pointer dereference
if a response arrives early?"
Patch addition for the rpmsg drvdata race
Add reviewed-by tag
Add amd,num-ctrl property to device tree
The property was requested in the discussion below
https://lore.kernel.org/all/34ffba5a-8e9a-49b9-9e36-c31d0e4369f8@amd.com/
Adding the device tree parameter was suggested in the review in v1
https://lore.kernel.org/all/34ffba5a-8e9a-49b9-9e36-c31d0e4369f8@amd.com/
New patch added to bailout if the cdx_mcdi_rpc fails.

Hayden Rinn (1):
  EDAC/versalnet: Wait for RPMsg endpoint initialization

Prasanna Kumar T S M (1):
  EDAC/versalnet: Fix device_register() error handling in init_one_mc()

Shubhrajyoti Datta (10):
  EDAC/versalnet: Use designated initializer for rpmsg_channel_info
  EDAC/versalnet: Fix use-after-free in remove_one_mc()
  EDAC/versalnet: Add bounds validation in rpmsg_cb()
  EDAC/versalnet: Make dwidth per-controller
  EDAC/versalnet: Initialize MCDI before RPMsg registration
  EDAC/versalnet: Guard against NULL drvdata in rpmsg_cb()
  EDAC/versalnet: Move platform_set_drvdata() to mc_probe()
  dt-bindings: memory: xlnx,versal-net-ddrmc5: Add amd,num-ctrl property
  EDAC/versalnet: use device tree property for number of controllers
  EDAC/versalnet: Make get_ddr_config() return errors

 .../xlnx,versal-net-ddrmc5.yaml               |   9 +
 drivers/edac/versalnet_edac.c                 | 283 +++++++++++++-----
 2 files changed, 220 insertions(+), 72 deletions(-)

-- 
2.44.4


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2026-11-20 16:55 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-18 14:20 [PATCH v2 00/12] EDAC/versalnet: Fix error handling, teardown, and robustness Shubhrajyoti Datta
2026-11-18 14:20 ` [PATCH v2 01/12] EDAC/versalnet: Fix device_register() error handling in init_one_mc() Shubhrajyoti Datta
2026-11-20 13:38   ` Pandey, Radhey Shyam
2026-11-18 14:20 ` [PATCH v2 02/12] EDAC/versalnet: Use designated initializer for rpmsg_channel_info Shubhrajyoti Datta
2026-11-20 13:39   ` Pandey, Radhey Shyam
2026-11-18 14:20 ` [PATCH v2 03/12] EDAC/versalnet: Fix use-after-free in remove_one_mc() Shubhrajyoti Datta
2026-11-18 14:20 ` [PATCH v2 04/12] EDAC/versalnet: Add bounds validation in rpmsg_cb() Shubhrajyoti Datta
2026-11-18 14:33   ` sashiko-bot
2026-11-20 12:18     ` Datta, Shubhrajyoti
2026-11-20 15:43   ` Pandey, Radhey Shyam
2026-11-18 14:20 ` [PATCH v2 05/12] EDAC/versalnet: Make dwidth per-controller Shubhrajyoti Datta
2026-11-20 16:54   ` Pandey, Radhey Shyam
2026-11-18 14:20 ` [PATCH v2 06/12] EDAC/versalnet: Wait for RPMsg endpoint initialization Shubhrajyoti Datta
2026-11-18 14:20 ` [PATCH v2 07/12] EDAC/versalnet: Initialize MCDI before RPMsg registration Shubhrajyoti Datta
2026-11-18 14:20 ` [PATCH v2 08/12] EDAC/versalnet: Guard against NULL drvdata in rpmsg_cb() Shubhrajyoti Datta
2026-11-18 14:20 ` [PATCH v2 09/12] EDAC/versalnet: Move platform_set_drvdata() to mc_probe() Shubhrajyoti Datta
2026-11-18 14:20 ` [PATCH v2 10/12] dt-bindings: memory: xlnx,versal-net-ddrmc5: Add amd,num-ctrl property Shubhrajyoti Datta
2026-11-18 14:20 ` [PATCH v2 11/12] EDAC/versalnet: use device tree property for number of controllers Shubhrajyoti Datta
2026-11-18 14:20 ` [PATCH v2 12/12] EDAC/versalnet: Make get_ddr_config() return errors Shubhrajyoti Datta

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.