Skip to content

of/irq: msi-parent handling in of_msi_xlate()

Fuad Tabba linux-devicetree lkml sashiko-reviews 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 3 repliesIn review
  2. v11 patch 5 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2of/irq: Fix device node refcount leak in of_check_msi_parent()drivers/of/irq.c+1 -11 reply
2/2of/irq: Stop the MSI walk at the first msi-parentdrivers/of/irq.c+22 -170 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/2] of/irq: msi-parent handling in of_msi_xlate()

Hi folks,

Changes since v1 [1]:
- Added patch 2: end the walk at the first node that declares an msi-parent, with the reference handling moved into of_msi_xlate(). (Lorenzo)
- Patch 1 is unchanged.

Patch 1 is the v1 fix: of_check_msi_parent() hands back a node reference even when the caller passed one in as a filter, which of_msi_xlate() documents as receiving none. Patch 2 is what Lorenzo asked for [2]: a node declaring an msi-parent names the MSI controller for what sits below it, so the walk ends there rather than carrying on to an ancestor's msi-map.

Patch 2 removes the line patch 1 adds, along with the rest of the reference handling. They stay separate because patch 1 is a small fix for a leak that has been there since v6.18, and patch 2 changes
behaviour: folding them would hide the fix inside the change.

Based on Linux 7.3-rc1 (cee9395acd804).

Cheers,
/fuad

[1] https://lore.kernel.org/all/[email protected]/
[2] https://lore.kernel.org/all/apqnaNmeuUjfC8Ng@red-moon/

Fuad Tabba (2):
of/irq: Fix device node refcount leak in of_check_msi_parent() of/irq: Stop the MSI walk at the first msi-parent

 drivers/of/irq.c | 39 ++++++++++++++++++++++-----------------
 1 file changed, 22 insertions(+), 17 deletions(-)
Signature · 1 line
2.39.5