Skip to content

mailbox: zynqmp-ipi: Improve resource cleanup on driver unbind

Harini T linux-arm-kernel lkml 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 3 repliesIn review
  2. v13 patches 3 repliesSuperseded

Changes in v2 from the cover letter

- Address review comments from V1.
- Patch 1/3 from V1 has been split into two patches in which the first focuses on removing the redundant mbox_controller_unregister() call and the second focuses on removing ipi_mbox->dev.parent check.
- Avoid using i-- as the 1st param in for loop.
- Avoid using variable name in the commit message for patch 3/4.
- Add Fixes tag for all the patches in the series.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4mailbox: zynqmp-ipi: Remove redundant mbox_controller_unregister() calldrivers/mailbox/zynqmp-ipi-mailbox.c+0 -11 reply
2/4mailbox: zynqmp-ipi: Remove dev.parent check in zynqmp_ipi_free_mboxesdrivers/mailbox/zynqmp-ipi-mailbox.c+2 -41 reply
3/4mailbox: zynqmp-ipi: Fix out-of-bounds access in mailbox cleanup loopdrivers/mailbox/zynqmp-ipi-mailbox.c+1 -11 reply
4/4mailbox: zynqmp-ipi: Fix SGI cleanup on unbinddrivers/mailbox/zynqmp-ipi-mailbox.c+10 -50 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchPeng Fan
1/4R-b
2/4R-b
3/4R-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH V2 0/4] mailbox: zynqmp-ipi: Improve resource cleanup on driver unbind

1. Remove redundant mbox_controller_unregister() call, as device_unregister() already handles controller cleanup.
2. Remove ipi_mbox->dev.parent check in zynqmp_ipi_free_mboxes() as device_is_registered() is the canonical and robust method to verify the device registration status.
3. Fix the mailbox cleanup loop to prevent out-of-bounds array access.
4. Fix SGI resource cleanup by using an explicit irq_type field for reliable SGI detection, replacing the unreliable IRQ number check.

---
Changes in V2:
- Address review comments from V1.
- Patch 1/3 from V1 has been split into two patches in which the first focuses on removing the redundant mbox_controller_unregister() call and the second focuses on removing ipi_mbox->dev.parent check.
- Avoid using i-- as the 1st param in for loop.
- Avoid using variable name in the commit message for patch 3/4.
- Add Fixes tag for all the patches in the series.

V1 link: https://lore.kernel.org/all/[email protected]/
---

Harini T (4):
mailbox: zynqmp-ipi: Remove redundant mbox_controller_unregister()
call
mailbox: zynqmp-ipi: Remove dev.parent check in zynqmp_ipi_free_mboxes
mailbox: zynqmp-ipi: Fix out-of-bounds access in mailbox cleanup loop
mailbox: zynqmp-ipi: Fix SGI cleanup on unbind

 drivers/mailbox/zynqmp-ipi-mailbox.c | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)
Signature · 1 line
2.43.0