Skip to contentSkip to conversation

of/irq: Make sure to update out_irq->np to the new parent in of_irq_parse_raw

PATCH In review WHR 2 participants 7 messages Jul 30, 2024 – Aug 2, 2024 Device tree

lore
Share & tools
lore

WHR

author
#0 lore raw

PATCH v2 1/1 of/irq: Make sure to update out_irq->np to the new parent in of_irq_parse_raw

Commit 935df1bd40d43c4ee91838c42a20e9af751885cc has removed an assignment statement for 'out_irq->np' right after label 'skiplevel', causing the new parent acquired from function of_irq_find_parent didn't being stored to 'out_irq->np' as it supposed to. Under some conditions this can resuit in multiple corruptions and leakages to device nodes.

Update 'out_irq->np' before jumping to label 'skiplevel'.

Fixes 935df1bd40d4 ("of/irq: Factor out parsing of interrupt-map parent

phandle+args from of_irq_parse_raw()")

---
v2:
Add 'Fixes:' line, and update subject.

 drivers/of/irq.c | 1 +
 1 file changed, 1 insertion(+)
drivers/of/irq.c +0 -0
index c94203ce65bb..580b33ce60d2 100644
@@ -263,6 +263,7 @@ int of_irq_parse_raw(const __be32 *addr, struct

of_phandle_args *out_irq)
if (imap == NULL) {
pr_debug(" -> no map, getting parent\n"); newpar = of_irq_find_parent(ipar);
+ out_irq->np = newpar;
goto skiplevel;
}
imaplen /= sizeof(u32);

Signature · 1 line
2.30.2
maintainer
#1 lore raw
Quoted 6 lines · WHR

Commit 935df1bd40d43c4ee91838c42a20e9af751885cc has removed an assignment statement for 'out_irq->np' right after label 'skiplevel', causing the new parent acquired from function of_irq_find_parent didn't being stored to 'out_irq->np' as it supposed to. Under some conditions this can resuit in multiple corruptions and leakages to device nodes.

Under what conditions? Please provide a specific platform and DT.

Quoted 6 lines

Update 'out_irq->np' before jumping to label 'skiplevel'.

Fixes 935df1bd40d4 ("of/irq: Factor out parsing of interrupt-map parent

phandle+args from of_irq_parse_raw()")

Need a name here.

Quoted 12 lines

---
v2:
Add 'Fixes:' line, and update subject.

 drivers/of/irq.c | 1 +
 1 file changed, 1 insertion(+)
drivers/of/irq.c +0 -0
index c94203ce65bb..580b33ce60d2 100644

drivers/of/irq.c int of_irq_parse_raw(const __be32 *addr, struct · line 267

Quoted 5 lines
drivers/of/irq.c +1 -0
@@ -263,6 +263,7 @@ int of_irq_parse_raw(const __be32 *addr, struct
 of_phandle_args *out_irq)
                if (imap == NULL) {
                        pr_debug(" -> no map, getting parent\n");
                        newpar = of_irq_find_parent(ipar);
+                       out_irq->np = newpar;

Honestly, I think the DT is wrong if you get to this point. We'd have to have the initial interrupt parent with #interrupt-cells, but not an interrupt-controller nor interrupt-map property to get here. Maybe that happens in some ancient platform, but if so, I want to know which one and what exactly we need to handle.

Rob

author
#2 lore raw
Quoted 9 lines · WHR
Quoted 6 lines

Commit 935df1bd40d43c4ee91838c42a20e9af751885cc has removed an assignment statement for 'out_irq->np' right after label 'skiplevel', causing the new parent acquired from function of_irq_find_parent didn't being stored to 'out_irq->np' as it supposed to. Under some conditions this can resuit in multiple corruptions and leakages to device nodes.

Under what conditions? Please provide a specific platform and DT.

I have a previous email sent to you before I came up with the fix. The kernel log for debugging and the device tree blob are attached again.

Quoted 5 lines

Honestly, I think the DT is wrong if you get to this point. We'd have to have the initial interrupt parent with #interrupt-cells, but not an interrupt-controller nor interrupt-map property to get here. Maybe that happens in some ancient platform, but if so, I want to know which one and what exactly we need to handle.

So you suggest the #interrupt-cells is erroneous in that node, and should be removed?

This is a device vendor-provided DT, so any issue in it will have to be fixed locally.

author
#3 lore raw
In reply to Rob Herring
Quoted 9 lines · WHR
Quoted 6 lines

Commit 935df1bd40d43c4ee91838c42a20e9af751885cc has removed an assignment statement for 'out_irq->np' right after label 'skiplevel', causing the new parent acquired from function of_irq_find_parent didn't being stored to 'out_irq->np' as it supposed to. Under some conditions this can resuit in multiple corruptions and leakages to device nodes.

Under what conditions? Please provide a specific platform and DT.

I have a previous email sent to you before I came up with the fix. The kernel log for debugging and the device tree blob are attached again.

Quoted 5 lines

Honestly, I think the DT is wrong if you get to this point. We'd have to have the initial interrupt parent with #interrupt-cells, but not an interrupt-controller nor interrupt-map property to get here. Maybe that happens in some ancient platform, but if so, I want to know which one and what exactly we need to handle.

So you suggest the #interrupt-cells is erroneous in that node, and should be removed?

This is a device vendor-provided DT, so any issue in it will have to be fixed locally.

I forgot to attach the files in last email.

[    2.235812] OF: next: usbdrd, reference count 4
[    2.240791] function: fw_devlink_parse_fwtree(ffffffd9ffdc5fa0)
[    2.247292] ffffffd9ffdc5f88 usbdrd, reference count 4
[    2.252937] parent ffffffd9ffdbddc8 soc, reference count 79
[    2.259069] usbdrd Linked as a fwnode consumer to clock-controller
[    2.265904] usbdrd Linked as a fwnode consumer to reset-controller
[    2.272744] ffffffd9ffdc5f88 usbdrd, reference count 4
[    2.278388] parent ffffffd9ffdbddc8 soc, reference count 79
[    2.284511] OF: ffffffd9ffdc5f88 usbdrd, reference count 4
[    2.290537] OF: of_get_next_available_child: "usbdrd", "usbdrd"
[    2.297038] OF: parent: usbdrd, reference count 4
[    2.302208] OF: parent: usbdrd, reference count 4
[    2.307368] OF: next: usb@10100000, reference count 3
[    2.312918] function: fw_devlink_parse_fwtree(ffffffd9ffdc6700)
[    2.319420] ffffffd9ffdc66e8 usb, reference count 3
[    2.324778] parent ffffffd9ffdc5f88 usbdrd, reference count 4
[    2.331118] usb@10100000 Linked as a fwnode consumer to usbdrd
[    2.337572] ffffffd9ffdc66e8 usb, reference count 3
[    2.342931] parent ffffffd9ffdc5f88 usbdrd, reference count 1
[    2.349244] OF: ffffffd9ffdc66e8 usb, reference count 3
[    2.354984] OF: of_get_next_available_child: "usb", "usb@10100000"
[    2.361772] OF: parentparent: usbdrd, reference count 1
[    2.367513] OF: parent: usb@10100000, reference count 3
[    2.373254] OF: parentparent: usbdrd, reference count 1
[    2.378985] OF: parent: usb@10100000, reference count 3
[    2.384726] OF: ffffffd9ffdc5f88 usbdrd, reference count 1
[    2.390752] OF: of_get_next_available_child: "usbdrd", "usbdrd"
[    2.397253] OF: parent: usbdrd, reference count 1
[    2.402422] OF: parent: usbdrd, reference count 1
[    2.407581] OF: prev: usb@10100000, reference count 3
[    2.413131] OF: of_get_next_available_child: "soc", "soc"
[    2.419061] OF: parent: soc, reference count 79
[    2.424041] OF: parent: soc, reference count 79
[    2.429010] OF: prev: usbdrd, reference count 1
[    2.433977] OF: next: multi-phyctrl@10210000, reference count 3
[    2.440527] OF: of_node_release: usbdrd
[    2.444731] OF: ERROR: Bad of_node_put() on usbdrd
[    2.449986] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.1.101-rivoreo-starfive #14
[    2.458294] Hardware name: StarFive VisionFive V2 (DT)
[    2.463928] Call Trace:
[    2.466606] [<ffffffff80003db2>] dump_backtrace+0x1c/0x24
[    2.472539] [<ffffffff804c94ee>] show_stack+0x2e/0x38
[    2.478086] [<ffffffff804d3dd8>] dump_stack_lvl+0x3c/0x54
[    2.484013] [<ffffffff804d3e04>] dump_stack+0x14/0x1c
[    2.489557] [<ffffffff804d2610>] of_node_release+0x40/0xf2
[    2.495578] [<ffffffff804b6090>] kobject_put+0x76/0xac
[    2.501220] [<ffffffff803763ae>] of_node_put+0x16/0x20
[    2.506860] [<ffffffff803725fe>] of_get_next_available_child+0x12a/0x152
[    2.514218] [<ffffffff80375430>] of_fwnode_get_next_child_node+0x86/0x9a
[    2.521577] [<ffffffff802c7b0a>] fwnode_get_next_child_node+0x28/0x36
[    2.528652] [<ffffffff802c7c64>] fwnode_get_next_available_child_node+0x1e/0x3a
[    2.536677] [<ffffffff802bebf0>] fw_devlink_parse_fwtree+0x10c/0x130
[    2.543653] [<ffffffff802bf936>] device_add+0x42e/0x562
[    2.549388] [<ffffffff80373b44>] of_device_add+0x22/0x2a
[    2.555219] [<ffffffff80374090>] of_platform_device_create_pdata+0x76/0x9a
[    2.562766] [<ffffffff8037445e>] of_platform_bus_create+0x218/0x288
[    2.569646] [<ffffffff803745c4>] of_platform_populate+0x58/0x90
[    2.576145] [<ffffffff80374614>] of_platform_default_populate+0x18/0x20
[    2.583407] [<ffffffff806246fe>] of_platform_default_populate_init+0xac/0xda
[    2.591149] [<ffffffff80001112>] do_one_initcall+0x5c/0x154
[    2.597264] [<ffffffff806010ca>] kernel_init_freeable+0x21e/0x222
[    2.603953] [<ffffffff804d4358>] kernel_init+0x1e/0x10a
[    2.609689] [<ffffffff800022b8>] ret_from_exception+0x0/0x16
[    2.615915] function: fw_devlink_parse_fwtree(ffffffd9ffdc6b90)
[    2.622429] OF: of_get_next_available_child: "multi-phyctrl", "multi-phyctrl@10210000"
[    2.631125] OF: parent: multi-phyctrl@10210000, reference count 3
[    2.637819] OF: parent: multi-phyctrl@10210000, reference count 3
[    2.644514] OF: of_get_next_available_child: "soc", "soc"
[    2.650444] OF: parent: soc, reference count 78
[    2.655423] OF: parent: soc, reference count 78
[    2.660392] OF: prev: multi-phyctrl@10210000, reference count 3
[    2.666885] OF: next: pcie1-phyctrl@10220000, reference count 3
[    2.673416] clock-controller Linked as a fwnode consumer to osc
[    2.679925] clock-controller Linked as a fwnode consumer to gmac1_rmii_refin
[    2.687674] clock-controller Linked as a fwnode consumer to gmac1_rgmii_rxin
[    2.695423] clock-controller Linked as a fwnode consumer to i2stx_bclk_ext
[    2.702983] clock-controller Linked as a fwnode consumer to i2stx_lrck_ext
[    2.710544] clock-controller Linked as a fwnode consumer to i2srx_bclk_ext
[    2.718105] clock-controller Linked as a fwnode consumer to i2srx_lrck_ext
[    2.725667] clock-controller Linked as a fwnode consumer to tdm_ext
[    2.732562] clock-controller Linked as a fwnode consumer to mclk_ext
[    2.739553] clock-controller Linked as a fwnode consumer to jtag_tck_inner
[    2.747124] clock-controller Linked as a fwnode consumer to bist_apb
[    2.754118] clock-controller Linked as a fwnode consumer to clk_rtc
[    2.761016] clock-controller Linked as a fwnode consumer to gmac0_rmii_refin
[    2.768773] clock-controller Linked as a fwnode consumer to gmac0_rgmii_rxin
[    2.776579] xrp Linked as a fwnode consumer to clock-controller
[    2.783094] xrp Linked as a fwnode consumer to reset-controller
[    2.789666] i2c@12050000 Linked as a fwnode consumer to clock-controller
[    2.797044] i2c@12050000 Linked as a fwnode consumer to reset-controller
[    2.804421] i2c@12050000 Linked as a fwnode consumer to plic@c000000
[    2.811441] i2c@12050000 Linked as a fwnode consumer to i2c5-pins
[    2.818317] i2c@12060000 Linked as a fwnode consumer to clock-controller
[    2.825695] i2c@12060000 Linked as a fwnode consumer to reset-controller
[    2.833072] i2c@12060000 Linked as a fwnode consumer to plic@c000000
[    2.840091] i2c@12060000 Linked as a fwnode consumer to i2c6-pins
[    2.846801] imx219@10 Linked as a fwnode consumer to clk-ext-camera
[    2.853699] imx219@10 Linked as a fwnode consumer to gpio@13040000
[    2.860515] imx219@10 Linked as a fwnode consumer to vin_sysctl@19800000
[    2.867911] imx708@1a Linked as a fwnode consumer to clk-ext-camera
[    2.874805] imx708@1a Linked as a fwnode consumer to gpio@13040000
[    2.881614] imx708@1a Linked as a fwnode consumer to vin_sysctl@19800000
[    2.889006] ov4689@36 Linked as a fwnode consumer to clk-ext-camera
[    2.895915] ov4689@36 Linked as a fwnode consumer to vin_sysctl@19800000
[    2.903313] i2stx_4ch0@120b0000 Linked as a fwnode consumer to clock-controller
[    2.911383] i2stx_4ch0@120b0000 Linked as a fwnode consumer to mclk_ext
[    2.918665] i2stx_4ch0@120b0000 Linked as a fwnode consumer to reset-controller
[    2.926723] i2stx_4ch0@120b0000 Linked as a fwnode consumer to mclk_ext_pins
[    2.934493] pwm@120d0000 Linked as a fwnode consumer to clock-controller
[    2.941862] pwm@120d0000 Linked as a fwnode consumer to reset-controller
[    2.949247] pwm@120d0000 Linked as a fwnode consumer to pwm-pins
[    2.955873] tmon@120e0000 Linked as a fwnode consumer to plic@c000000
[    2.962959] tmon@120e0000 Linked as a fwnode consumer to clock-controller
[    2.970438] tmon@120e0000 Linked as a fwnode consumer to reset-controller
[    2.977944] spi@13010000 Linked as a fwnode consumer to plic@c000000
[    2.984934] spi@13010000 Linked as a fwnode consumer to clock-controller
[    2.992327] spi@13010000 Linked as a fwnode consumer to reset-controller
[    2.999815] gpio@13040000 Linked as a fwnode consumer to clock-controller
[    3.007280] gpio@13040000 Linked as a fwnode consumer to reset-controller
[    3.014752] gpio@13040000 Linked as a fwnode consumer to plic@c000000
[    3.023112] timer@13050000 Linked as a fwnode consumer to plic@c000000
[    3.030322] timer@13050000 Linked as a fwnode consumer to clock-controller
[    3.037906] timer@13050000 Linked as a fwnode consumer to reset-controller
[    3.045502] mailbox@13060000 Linked as a fwnode consumer to clock-controller
[    3.053256] mailbox@13060000 Linked as a fwnode consumer to reset-controller
[    3.061017] mailbox@13060000 Linked as a fwnode consumer to plic@c000000
[    3.068424] wdog@13070000 Linked as a fwnode consumer to plic@c000000
[    3.075514] wdog@13070000 Linked as a fwnode consumer to clock-controller
[    3.082986] wdog@13070000 Linked as a fwnode consumer to reset-controller
[    3.090484] jpu@13090000 Linked as a fwnode consumer to plic@c000000
[    3.097473] jpu@13090000 Linked as a fwnode consumer to clock-controller
[    3.104860] jpu@13090000 Linked as a fwnode consumer to reset-controller
[    3.112241] jpu@13090000 Linked as a fwnode consumer to power-controller@17030000
[    3.120494] vpu_dec@130A0000 Linked as a fwnode consumer to plic@c000000
[    3.127866] vpu_dec@130A0000 Linked as a fwnode consumer to clock-controller
[    3.135640] vpu_dec@130A0000 Linked as a fwnode consumer to reset-controller
[    3.143415] vpu_dec@130A0000 Linked as a fwnode consumer to power-controller@17030000
[    3.152049] vpu_enc@130B0000 Linked as a fwnode consumer to plic@c000000
[    3.159421] vpu_enc@130B0000 Linked as a fwnode consumer to clock-controller
[    3.167196] vpu_enc@130B0000 Linked as a fwnode consumer to reset-controller
[    3.174972] vpu_enc@130B0000 Linked as a fwnode consumer to power-controller@17030000
[    3.183613] crypto@16000000 Linked as a fwnode consumer to plic@c000000
[    3.190902] crypto@16000000 Linked as a fwnode consumer to clock-controller
[    3.198566] crypto@16000000 Linked as a fwnode consumer to reset-controller
[    3.206276] sec_dma@16008000 Linked as a fwnode consumer to plic@c000000
[    3.213648] sec_dma@16008000 Linked as a fwnode consumer to clock-controller
[    3.221406] sec_dma@16008000 Linked as a fwnode consumer to reset-controller
[    3.229191] trng@1600C000 Linked as a fwnode consumer to clock-controller
[    3.236663] trng@1600C000 Linked as a fwnode consumer to reset-controller
[    3.244135] trng@1600C000 Linked as a fwnode consumer to plic@c000000
[    3.251238] mmc@16010000 Linked as a fwnode consumer to clock-controller
[    3.258615] mmc@16010000 Linked as a fwnode consumer to reset-controller
[    3.265997] mmc@16010000 Linked as a fwnode consumer to plic@c000000
[    3.273044] mmc@16010000 Linked as a fwnode consumer to DCDC1
[    3.279369] mmc@16010000 Linked as a fwnode consumer to ALDO4
[    3.285693] mmc@16010000 Linked as a fwnode consumer to mmc0-pins
[    3.292411] mmc@16020000 Linked as a fwnode consumer to clock-controller
[    3.299788] mmc@16020000 Linked as a fwnode consumer to reset-controller
[    3.307168] mmc@16020000 Linked as a fwnode consumer to plic@c000000
[    3.314205] mmc@16020000 Linked as a fwnode consumer to sdcard1-pins
[    3.321214] ethernet@16030000 Linked as a fwnode consumer to clock-controller
[    3.329097] ethernet@16030000 Linked as a fwnode consumer to reset-controller
[    3.336959] ethernet@16030000 Linked as a fwnode consumer to plic@c000000
[    3.344552] ethernet@16040000 Linked as a fwnode consumer to clock-controller
[    3.352433] ethernet@16040000 Linked as a fwnode consumer to reset-controller
[    3.360295] ethernet@16040000 Linked as a fwnode consumer to plic@c000000
[    3.367881] dma-controller@16050000 Linked as a fwnode consumer to clock-controller
[    3.376312] dma-controller@16050000 Linked as a fwnode consumer to reset-controller
[    3.384746] dma-controller@16050000 Linked as a fwnode consumer to plic@c000000
[    3.392840] gpio@17020000 Linked as a fwnode consumer to reset-controller
[    3.400312] gpio@17020000 Linked as a fwnode consumer to plic@c000000
[    3.407427] power-controller@17030000 Linked as a fwnode consumer to plic@c000000
[    3.415683] rtc@17040000 Linked as a fwnode consumer to plic@c000000
[    3.422692] rtc@17040000 Linked as a fwnode consumer to clock-controller
[    3.430070] rtc@17040000 Linked as a fwnode consumer to reset-controller
[    3.437471] gpu@18000000 Linked as a fwnode consumer to clock-controller
[    3.444871] gpu@18000000 Linked as a fwnode consumer to reset-controller
[    3.452247] gpu@18000000 Linked as a fwnode consumer to power-controller@17030000
[    3.460482] gpu@18000000 Linked as a fwnode consumer to plic@c000000
[    3.467493] vin_sysctl@19800000 Linked as a fwnode consumer to clock-controller@19810000
[    3.476491] vin_sysctl@19800000 Linked as a fwnode consumer to clock-controller
[    3.484556] vin_sysctl@19800000 Linked as a fwnode consumer to reset-controller
[    3.492704] vin_sysctl@19800000 Linked as a fwnode consumer to power-controller@17030000
[    3.501607] vin_sysctl@19800000 Linked as a fwnode consumer to plic@c000000
[    3.509335] vin_sysctl@19800000 Linked as a fwnode consumer to imx219@10
[    3.516734] vin_sysctl@19800000 Linked as a fwnode consumer to imx708@1a
[    3.524132] vin_sysctl@19800000 Linked as a fwnode consumer to ov4689@36
[    3.531531] clock-controller@19810000 Linked as a fwnode consumer to clock-controller
[    3.540158] clock-controller@19810000 Linked as a fwnode consumer to reset-controller
[    3.548778] clock-controller@19810000 Linked as a fwnode consumer to power-controller@17030000
[    3.558271] dc8200@29400000 Linked as a fwnode consumer to plic@c000000
[    3.565547] dc8200@29400000 Linked as a fwnode consumer to clock-controller
[    3.573215] dc8200@29400000 Linked as a fwnode consumer to clock-controller@295C0000
[    3.581783] dc8200@29400000 Linked as a fwnode consumer to hdmitx0_pixelclk
[    3.589490] dc8200@29400000 Linked as a fwnode consumer to reset-controller
[    3.597210] dc8200@29400000 Linked as a fwnode consumer to hdmi@29590000
[    3.604592] dc8200@29400000 Linked as a fwnode consumer to dsi-output
[    3.611697] hdmi@29590000 Linked as a fwnode consumer to plic@c000000
[    3.618781] hdmi@29590000 Linked as a fwnode consumer to clock-controller@295C0000
[    3.627110] hdmi@29590000 Linked as a fwnode consumer to hdmitx0_pixelclk
[    3.634581] hdmi@29590000 Linked as a fwnode consumer to reset-controller
[    3.642059] hdmi@29590000 Linked as a fwnode consumer to inno_hdmi-pins
[    3.649334] hdmi@29590000 Linked as a fwnode consumer to gpio@13040000
[    3.656535] hdmi@29590000 Linked as a fwnode consumer to dc8200@29400000
[    3.663933] clock-controller@295C0000 Linked as a fwnode consumer to hdmitx0_pixelclk
[    3.672539] clock-controller@295C0000 Linked as a fwnode consumer to mipitx_dphy_rxesc
[    3.681249] clock-controller@295C0000 Linked as a fwnode consumer to mipitx_dphy_txbytehs
[    3.690239] clock-controller@295C0000 Linked as a fwnode consumer to clock-controller
[    3.698860] clock-controller@295C0000 Linked as a fwnode consumer to reset-controller
[    3.707475] clock-controller@295C0000 Linked as a fwnode consumer to power-controller@17030000
[    3.716965] mipi@295d0000 Linked as a fwnode consumer to plic@c000000
[    3.724053] mipi@295d0000 Linked as a fwnode consumer to clock-controller@295C0000
[    3.732394] mipi@295d0000 Linked as a fwnode consumer to reset-controller
[    3.739889] mipi@295d0000 Linked as a fwnode consumer to mipi-dphy@295e0000
[    3.747585] mipi@295d0000 Linked as a fwnode consumer to seeed_plane_i2c@45
[    3.755255] mipi@295d0000 Linked as a fwnode consumer to panel_radxa@19
[    3.762546] mipi@295d0000 Linked as a fwnode consumer to dsi-output
[    3.769459] mipi-dphy@295e0000 Linked as a fwnode consumer to clock-controller@295C0000
[    3.778265] mipi-dphy@295e0000 Linked as a fwnode consumer to reset-controller
[    3.786276] pcie@2B000000 Linked as a fwnode consumer to plic@c000000
[    3.793383] pcie@2B000000 Linked as a fwnode consumer to reset-controller
[    3.800878] pcie@2B000000 Linked as a fwnode consumer to clock-controller
[    3.808368] pcie@2B000000 Linked as a fwnode consumer to pcie0_wake_default
[    3.816020] pcie@2B000000 Linked as a fwnode consumer to pcie0_clkreq_default
[    3.823868] pcie@2B000000 Linked as a fwnode consumer to gpio@13040000
[    3.831103] pcie@2C000000 Linked as a fwnode consumer to plic@c000000
[    3.838210] pcie@2C000000 Linked as a fwnode consumer to reset-controller
[    3.845706] pcie@2C000000 Linked as a fwnode consumer to clock-controller
[    3.853195] pcie@2C000000 Linked as a fwnode consumer to pcie1_wake_default
[    3.860861] pcie@2C000000 Linked as a fwnode consumer to pcie1_clkreq_default
[    3.868712] pcie@2C000000 Linked as a fwnode consumer to gpio@13040000
[    3.875910] e24 Linked as a fwnode consumer to clock-controller
[    3.882435] e24 Linked as a fwnode consumer to reset-controller
[    3.888952] e24 Linked as a fwnode consumer to plic@c000000
[    3.895090] e24 Linked as a fwnode consumer to mailbox@13060000
[    3.901632] /soc: Relaxing link with /soc/plic@c000000
[    3.907291] platform soc: Fixed dependency cycle(s) with /soc/plic@c000000
[    3.914859] platform soc: Not linking /soc/plic@c000000 - might never become dev
[    3.922992] soc Dropping the fwnode link to plic@c000000
[    3.928832] platform soc: Not linking /cpus/cpu@4/interrupt-controller - might never become dev
[    3.938399] platform soc: Not linking /cpus/cpu@3/interrupt-controller - might never become dev
[    3.947966] platform soc: Not linking /cpus/cpu@2/interrupt-controller - might never become dev
[    3.957532] platform soc: Not linking /cpus/cpu@1/interrupt-controller - might never become dev
[    3.967102] platform soc: Not linking /soc/plic@c000000 - might never become dev
[    3.975237] platform soc: Not linking /cpus/cpu@4/interrupt-controller - might never become dev
[    3.984804] platform soc: Not linking /cpus/cpu@3/interrupt-controller - might never become dev
[    3.994370] platform soc: Not linking /cpus/cpu@2/interrupt-controller - might never become dev
[    4.003937] platform soc: Not linking /cpus/cpu@1/interrupt-controller - might never become dev
[    4.013507] platform soc: Not linking /soc/plic@c000000 - might never become dev
[    4.021647] platform soc: Not linking /soc/plic@c000000 - might never become dev
[    4.029786] platform soc: Not linking /soc/plic@c000000 - might never become dev
[    4.037925] platform soc: Not linking /soc/plic@c000000 - might never become dev
[    4.046081] platform soc: Not linking /soc/plic@c000000 - might never become dev
[    4.054229] ------------[ cut here ]------------
[    4.059290] refcount_t: addition on 0; use-after-free.
[    4.064953] WARNING: CPU: 0 PID: 1 at lib/refcount.c:25 refcount_warn_saturate+0x90/0xf4
[    4.073844] Modules linked in:
[    4.077192] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.1.101-rivoreo-starfive #14
[    4.085499] Hardware name: StarFive VisionFive V2 (DT)
[    4.091132] epc : refcount_warn_saturate+0x90/0xf4
[    4.096391]  ra : refcount_warn_saturate+0x90/0xf4
[    4.101650] epc : ffffffff801d0a04 ra : ffffffff801d0a04 sp : ffffffc80400ba80
[    4.109574]  gp : ffffffff810e26c0 tp : ffffffd8bff50000 t0 : 746e756f63666572
[    4.117497]  t1 : 0000000000000072 t2 : 5f746e756f636665 s0 : ffffffc80400ba90
[    4.125420]  s1 : ffffffd9ffdc6008 a0 : 000000000000002a a1 : ffffffff8108f948
[    4.133343]  a2 : 0000000000000010 a3 : 00000000000002b3 a4 : 0000000000000000
[    4.141266]  a5 : 0000000000000000 a6 : ffffffc80400b878 a7 : ffffffc80400b868
[    4.149189]  s2 : ffffffd9ffdc5f88 s3 : ffffffd9ffdc47e0 s4 : ffffffff810e2634
[    4.157112]  s5 : 0000000200000022 s6 : ffffffd9ffdbdde0 s7 : fffffffffffffff5
[    4.165035]  s8 : 0000000000000000 s9 : 0000000000000000 s10: 0000000000000000
[    4.172957]  s11: 0000000000000000 t3 : ffffffff810f5697 t4 : ffffffff810f5697
[    4.180880]  t5 : ffffffff810f5698 t6 : ffffffff810f56c0
[    4.186705] status: 0000000200000100 badaddr: 0000000000000000 cause: 0000000000000003
[    4.195391] [<ffffffff801d0a04>] refcount_warn_saturate+0x90/0xf4
[    4.202081] [<ffffffff804b5f56>] kobject_get+0x54/0x60
[    4.207722] [<ffffffff8037638c>] of_node_get+0x1a/0x26
[    4.213360] [<ffffffff8037257c>] of_get_next_available_child+0xa8/0x152
[    4.220622] [<ffffffff80375430>] of_fwnode_get_next_child_node+0x86/0x9a
[    4.227981] [<ffffffff802c7b0a>] fwnode_get_next_child_node+0x28/0x36
[    4.235053] [<ffffffff802c7c64>] fwnode_get_next_available_child_node+0x1e/0x3a
[    4.243077] [<ffffffff802bffa8>] __fw_devlink_link_to_suppliers+0x40/0x94
[    4.250529] [<ffffffff802bf958>] device_add+0x450/0x562
[    4.256264] [<ffffffff80373b44>] of_device_add+0x22/0x2a
[    4.262094] [<ffffffff80374090>] of_platform_device_create_pdata+0x76/0x9a
[    4.269642] [<ffffffff8037445e>] of_platform_bus_create+0x218/0x288
[    4.276523] [<ffffffff803745c4>] of_platform_populate+0x58/0x90
[    4.283022] [<ffffffff80374614>] of_platform_default_populate+0x18/0x20
[    4.290283] [<ffffffff806246fe>] of_platform_default_populate_init+0xac/0xda
[    4.298023] [<ffffffff80001112>] do_one_initcall+0x5c/0x154
[    4.304138] [<ffffffff806010ca>] kernel_init_freeable+0x21e/0x222
[    4.310826] [<ffffffff804d4358>] kernel_init+0x1e/0x10a
[    4.316562] [<ffffffff800022b8>] ret_from_exception+0x0/0x16
[    4.322773] ---[ end trace 0000000000000000 ]---
[    4.327852] OF: ffffffd9ffdc5f88 usbdrd, reference count 3221225472
[    4.334741] OF: ffffffd9ffdc66e8 usb, reference count 3
[    4.340482] OF: ffffffd9ffdc5f88 usbdrd, reference count 3221225472
[    4.347368] ------------[ cut here ]------------
[    4.352428] refcount_t: underflow; use-after-free.
[    4.357697] WARNING: CPU: 0 PID: 1 at lib/refcount.c:28 refcount_warn_saturate+0xb0/0xf4
[    4.366584] Modules linked in:
[    4.369932] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G        W          6.1.101-rivoreo-starfive #14
[    4.379860] Hardware name: StarFive VisionFive V2 (DT)
[    4.385492] epc : refcount_warn_saturate+0xb0/0xf4
[    4.390751]  ra : refcount_warn_saturate+0xb0/0xf4
[    4.396010] epc : ffffffff801d0a24 ra : ffffffff801d0a24 sp : ffffffc80400ba80
[    4.403934]  gp : ffffffff810e26c0 tp : ffffffd8bff50000 t0 : 5f00000000000000
[    4.411857]  t1 : 0000000000000072 t2 : 5f746e756f636665 s0 : ffffffc80400ba90
[    4.419780]  s1 : ffffffd9ffdc6008 a0 : 0000000000000026 a1 : ffffffff8108f948
[    4.427703]  a2 : 0000000000000010 a3 : 00000000000002de a4 : 0000000000000000
[    4.435625]  a5 : 0000000000000000 a6 : ffffffc80400b878 a7 : ffffffc80400b868
[    4.443548]  s2 : ffffffd9ffdc6b78 s3 : ffffffd9ffdc5f88 s4 : ffffffff810e2634
[    4.451471]  s5 : 0000000200000022 s6 : ffffffd9ffdbdde0 s7 : fffffffffffffff5
[    4.459394]  s8 : 0000000000000000 s9 : 0000000000000000 s10: 0000000000000000
[    4.467317]  s11: 0000000000000000 t3 : ffffffff810f5697 t4 : ffffffff810f5697
[    4.475239]  t5 : ffffffff810f5698 t6 : ffffffff810f56b8
[    4.481063] status: 0000000200000100 badaddr: 0000000000000000 cause: 0000000000000003
[    4.489748] [<ffffffff801d0a24>] refcount_warn_saturate+0xb0/0xf4
[    4.496438] [<ffffffff804b60b4>] kobject_put+0x9a/0xac
[    4.502080] [<ffffffff803763ae>] of_node_put+0x16/0x20
[    4.507717] [<ffffffff803725fe>] of_get_next_available_child+0x12a/0x152
[    4.515074] [<ffffffff80375430>] of_fwnode_get_next_child_node+0x86/0x9a
[    4.522433] [<ffffffff802c7b0a>] fwnode_get_next_child_node+0x28/0x36
[    4.529505] [<ffffffff802c7c64>] fwnode_get_next_available_child_node+0x1e/0x3a
[    4.537530] [<ffffffff802bffa8>] __fw_devlink_link_to_suppliers+0x40/0x94
[    4.544982] [<ffffffff802bf958>] device_add+0x450/0x562
[    4.550716] [<ffffffff80373b44>] of_device_add+0x22/0x2a
[    4.556547] [<ffffffff80374090>] of_platform_device_create_pdata+0x76/0x9a
[    4.564094] [<ffffffff8037445e>] of_platform_bus_create+0x218/0x288
[    4.570974] [<ffffffff803745c4>] of_platform_populate+0x58/0x90
[    4.577473] [<ffffffff80374614>] of_platform_default_populate+0x18/0x20
[    4.584735] [<ffffffff806246fe>] of_platform_default_populate_init+0xac/0xda
[    4.592475] [<ffffffff80001112>] do_one_initcall+0x5c/0x154
[    4.598589] [<ffffffff806010ca>] kernel_init_freeable+0x21e/0x222
[    4.605278] [<ffffffff804d4358>] kernel_init+0x1e/0x10a
[    4.611013] [<ffffffff800022b8>] ret_from_exception+0x0/0x16
[    4.617224] ---[ end trace 0000000000000000 ]---
[    4.622303] platform soc: Not linking /gmac0_rgmii_rxin - might never become dev
[    4.630434] platform soc: Not linking /gmac0_rmii_refin - might never become dev
[    4.638564] platform soc: Not linking /clk_rtc - might never become dev
[    4.645827] platform soc: Not linking /bist_apb - might never become dev
[    4.653194] platform soc: Not linking /jtag_tck_inner - might never become dev
[    4.661132] platform soc: Not linking /mclk_ext - might never become dev
[    4.668499] platform soc: Not linking /tdm_ext - might never become dev
[    4.675770] platform soc: Not linking /i2srx_lrck_ext - might never become dev
[    4.683709] platform soc: Not linking /i2srx_bclk_ext - might never become dev
[    4.691648] platform soc: Not linking /i2stx_lrck_ext - might never become dev
[    4.699594] platform soc: Not linking /i2stx_bclk_ext - might never become dev
[    4.707532] platform soc: Not linking /gmac1_rgmii_rxin - might never become dev
[    4.715662] platform soc: Not linking /gmac1_rmii_refin - might never become dev
[    4.723791] platform soc: Not linking /osc - might never become dev
[    4.730698] platform soc: Not linking /soc/plic@c000000 - might never become dev
[    4.738852] platform soc: Not linking /soc/plic@c000000 - might never become dev
[    4.746991] platform soc: Not linking /clk-ext-camera - might never become dev
[    4.754938] platform soc: Not linking /clk-ext-camera - might never become dev
[    4.762883] platform soc: Not linking /clk-ext-camera - might never become dev
[    4.770833] platform soc: Not linking /mclk_ext - might never become dev
[    4.778214] platform soc: Not linking /soc/plic@c000000 - might never become dev
[    4.786351] platform soc: Not linking /soc/plic@c000000 - might never become dev
[    4.794488] platform soc: Not linking /soc/plic@c000000 - might never become dev
[    4.802770] platform soc: Not linking /soc/plic@c000000 - might never become dev
[    4.810907] platform soc: Not linking /soc/plic@c000000 - might never become dev
[    4.819047] platform soc: Not linking /soc/plic@c000000 - might never become dev
[    4.827185] platform soc: Not linking /soc/plic@c000000 - might never become dev
[    4.835323] platform soc: Not linking /soc/plic@c000000 - might never become dev
[    4.843462] platform soc: Not linking /soc/plic@c000000 - might never become dev
[    4.851601] platform soc: Not linking /soc/plic@c000000 - might never become dev
[    4.859739] platform soc: Not linking /soc/plic@c000000 - might never become dev
[    4.867874] platform soc: Not linking /soc/plic@c000000 - might never become dev
[    4.876017] platform soc: Not linking /soc/plic@c000000 - might never become dev
[    4.884156] platform soc: Not linking /soc/plic@c000000 - might never become dev
[    4.892295] platform soc: Not linking /soc/plic@c000000 - might never become dev
[    4.900435] platform soc: Not linking /soc/plic@c000000 - might never become dev
[    4.908575] platform soc: Not linking /soc/plic@c000000 - might never become dev
[    4.916714] platform soc: Not linking /soc/plic@c000000 - might never become dev
[    4.924850] platform soc: Not linking /soc/plic@c000000 - might never become dev
[    4.932986] platform soc: Not linking /soc/plic@c000000 - might never become dev
[    4.941121] platform soc: Not linking /soc/plic@c000000 - might never become dev
[    4.949271] platform soc: Not linking /soc/plic@c000000 - might never become dev
[    4.957493] platform soc: Linked as a sync state only consumer to dsi-output
[    4.965243] platform soc: Not linking /hdmitx0_pixelclk - might never become dev
[    4.973375] platform soc: Not linking /soc/plic@c000000 - might never become dev
[    4.981521] platform soc: Not linking /hdmitx0_pixelclk - might never become dev
[    4.989652] platform soc: Not linking /soc/plic@c000000 - might never become dev
[    4.997795] platform soc: Not linking /mipitx_dphy_txbytehs - might never become dev
[    5.006306] platform soc: Not linking /mipitx_dphy_rxesc - might never become dev
[    5.014531] platform soc: Not linking /hdmitx0_pixelclk - might never become dev
[    5.022670] platform soc: Not linking /soc/plic@c000000 - might never become dev
[    5.030824] platform soc: Not linking /soc/plic@c000000 - might never become dev
[    5.038966] platform soc: Not linking /soc/plic@c000000 - might never become dev
[    5.047104] platform soc: Not linking /soc/plic@c000000 - might never become dev
[    5.055382] platform 2000000.clint: Not linking /cpus/cpu@4/interrupt-controller - might never become dev
[    5.065905] clint@2000000 Dropping the fwnode link to interrupt-controller
[    5.073461] platform 2000000.clint: Not linking /cpus/cpu@3/interrupt-controller - might never become dev
[    5.083979] clint@2000000 Dropping the fwnode link to interrupt-controller
[    5.091535] platform 2000000.clint: Not linking /cpus/cpu@2/interrupt-controller - might never become dev
[    5.102054] clint@2000000 Dropping the fwnode link to interrupt-controller
[    5.109611] platform 2000000.clint: Not linking /cpus/cpu@1/interrupt-controller - might never become dev
[    5.120129] clint@2000000 Dropping the fwnode link to interrupt-controller
[    5.127866] platform 2010000.cache-controller: Not linking /soc/plic@c000000 - might never become dev
[    5.138003] cache-controller@2010000 Dropping the fwnode link to plic@c000000
[    5.145996] platform 10000000.serial: Not linking /soc/plic@c000000 - might never become dev
[    5.155274] serial@10000000 Dropping the fwnode link to plic@c000000
[    5.162410] platform 10010000.serial: Not linking /soc/plic@c000000 - might never become dev
[    5.171688] serial@10010000 Dropping the fwnode link to plic@c000000
[    5.178832] platform 10030000.i2c: Not linking /soc/plic@c000000 - might never become dev
[    5.187825] i2c@10030000 Dropping the fwnode link to plic@c000000
[    5.194688] platform 10050000.i2c: Not linking /soc/plic@c000000 - might never become dev
[    5.203680] i2c@10050000 Dropping the fwnode link to plic@c000000
[    5.210551] amba 10060000.spi: Not linking /soc/plic@c000000 - might never become dev
[    5.219163] spi@10060000 Dropping the fwnode link to plic@c000000
[    5.226052] ------------[ cut here ]------------
[    5.231114] refcount_t: saturated; leaking memory.
[    5.236383] WARNING: CPU: 0 PID: 1 at lib/refcount.c:22 refcount_warn_saturate+0x70/0xf4
[    5.245271] Modules linked in:
[    5.248619] CPU: 0 PID: 1 Comm: swapper/0 Tainted: G        W          6.1.101-rivoreo-starfive #14
[    5.258547] Hardware name: StarFive VisionFive V2 (DT)
[    5.264180] epc : refcount_warn_saturate+0x70/0xf4
[    5.269440]  ra : refcount_warn_saturate+0x70/0xf4
[    5.274699] epc : ffffffff801d09e4 ra : ffffffff801d09e4 sp : ffffffc80400bc30
[    5.282623]  gp : ffffffff810e26c0 tp : ffffffd8bff50000 t0 : 5f00000000000000
[    5.290547]  t1 : 0000000000000072 t2 : 5f746e756f636665 s0 : ffffffc80400bc40
[    5.298469]  s1 : ffffffd9ffdc6008 a0 : 0000000000000026 a1 : ffffffff8108f948
[    5.306393]  a2 : 0000000000000010 a3 : 0000000000000350 a4 : 0000000000000000
[    5.314316]  a5 : 0000000000000000 a6 : ffffffc80400ba28 a7 : ffffffc80400ba18
[    5.322239]  s2 : ffffffd9ffdc5948 s3 : ffffffd8bfef4410 s4 : 0000000000000000
[    5.330162]  s5 : 0000000000000000 s6 : ffffffff80acbfb8 s7 : 0000000000000001
[    5.338084]  s8 : 0000000000000000 s9 : 0000000000000000 s10: 0000000000000000
[    5.346007]  s11: 0000000000000000 t3 : ffffffff810f5697 t4 : ffffffff810f5697
[    5.353929]  t5 : ffffffff810f5698 t6 : ffffffff810f56b8
[    5.359754] status: 0000000200000100 badaddr: 0000000000000000 cause: 0000000000000003
[    5.368440] [<ffffffff801d09e4>] refcount_warn_saturate+0x70/0xf4
[    5.375130] [<ffffffff804b5f56>] kobject_get+0x54/0x60
[    5.380771] [<ffffffff8037638c>] of_node_get+0x1a/0x26
[    5.386410] [<ffffffff8037163a>] of_get_next_child+0x36/0x62
[    5.392623] [<ffffffff803744ae>] of_platform_bus_create+0x268/0x288
[    5.399503] [<ffffffff803745c4>] of_platform_populate+0x58/0x90
[    5.406002] [<ffffffff80374614>] of_platform_default_populate+0x18/0x20
[    5.413263] [<ffffffff806246fe>] of_platform_default_populate_init+0xac/0xda
[    5.421004] [<ffffffff80001112>] do_one_initcall+0x5c/0x154
[    5.427118] [<ffffffff806010ca>] kernel_init_freeable+0x21e/0x222
[    5.433806] [<ffffffff804d4358>] kernel_init+0x1e/0x10a
[    5.439542] [<ffffffff800022b8>] ret_from_exception+0x0/0x16
[    5.445753] ---[ end trace 0000000000000000 ]---
[    5.450912] platform 10210000.usbdrd: Error -2 creating of_node link
[    5.457955] ffffffd9ffdc5f88 usbdrd, reference count 3221225472
[    5.464460] parent ffffffd9ffdbddc8 soc, reference count 78
[    5.470582] ffffffd9ffdc5f88 usbdrd, reference count 3221225472
[    5.477085] parent ffffffd9ffdbddc8 soc, reference count 78
[    5.483206] OF: ffffffd9ffdc5f88 usbdrd, reference count 3221225472
[    5.490092] ffffffd9ffdc66e8 usb, reference count 3
[    5.495450] parent ffffffd9ffdc5f88 usbdrd, reference count 3221225472
[    5.502621] ffffffd9ffdc66e8 usb, reference count 3
[    5.507979] parent ffffffd9ffdc5f88 usbdrd, reference count 3221225472
[    5.515149] OF: ffffffd9ffdc66e8 usb, reference count 3
[    5.520890] OF: ffffffd9ffdc5f88 usbdrd, reference count 3221225472
[    5.527791] OF: ffffffd9ffdc5f88 usbdrd, reference count 3221225472
[    5.534678] OF: ffffffd9ffdc66e8 usb, reference count 3
[    5.540419] OF: ffffffd9ffdc5f88 usbdrd, reference count 3221225472
[    5.547835] devices_kset: Moving 10210000.usbdrd to end of list
[    5.554345] platform 10210000.usbdrd: Linked as a consumer to 13020000.clock-controller
[    5.563137] usbdrd Dropping the fwnode link to clock-controller
[    5.569715] devices_kset: Moving 100b0000.pwmdac to end of list
[    5.576223] platform 100b0000.pwmdac: Linked as a consumer to 13020000.clock-controller
[    5.585014] pwmdac@100b0000 Dropping the fwnode link to clock-controller
[    5.592450] devices_kset: Moving 10060000.spi to end of list
[    5.598671] amba 10060000.spi: Linked as a consumer to 13020000.clock-controller

� ���A8�|( ��D'starfive,visionfive-v2starfive,jh7110 &StarFive VisionFive V2ac108_mclk fixed-clock,9n6bist_apb fixed-clock,9���I-clk-ext-camera fixed-clock,9n6I4clk_rtc fixed-clock,9�I.gmac0_rgmii_rxin fixed-clock,9sY@I0gmac0_rmii_refin fixed-clock,9���I/gmac1_rgmii_rxin fixed-clock,9sY@I)gmac1_rmii_refin fixed-clock,9���I(hdmitx0_pixelclk fixed-clock,9��@IIi2srx_bclk_ext fixed-clock,9��I"i2srx_lrck_ext fixed-clock,9�I#i2stx_bclk_ext fixed-clock,9��I*i2stx_lrck_ext fixed-clock,9�I+jtag_tck_inner fixed-clock,9���I,mclk_ext fixed-clock,9��Imipitx_dphy_rxesc fixed-clock,9���IOmipitx_dphy_txbytehs fixed-clock,9��@IPosc fixed-clock,9n6I'tdm_ext fixed-clock,9�Iwm8960_mclk fixed-clock,9wcpus Q= cpu@0sifive,s7riscvdhcput@�@�@��rv64imac_zba_zbb� �disabledIbinterrupt-controllerriscv,cpu-intc��Icpu@1sifive,u74-mcriscvd�@ @�%0(hcput@�@��;F( Qriscv,sv39��rv64imafdc_zba_zbbZ�dxcpu�Iinterrupt-controllerriscv,cpu-intc��Icpu@2sifive,u74-mcriscvd�@ @�%0(hcput@�@��;F( Qriscv,sv39��rv64imafdc_zba_zbbZ�dxcpuIinterrupt-controllerriscv,cpu-intc��Icpu@3sifive,u74-mcriscvd�@ @�%0(hcput@�@��;F( Qriscv,sv39��rv64imafdc_zba_zbbZ�dxcpuIinterrupt-controllerriscv,cpu-intc��Icpu@4sifive,u74-mcriscvd�@ @�%0(hcput@�@��;F( Qriscv,sv39��rv64imafdc_zba_zbbZ�dxcpuIinterrupt-controllerriscv,cpu-intc��Icpu-mapcluster0core0�core1�core2�core3�opp-table-0operating-points-v2�Iopp-375000000�Z �� 5opp-500000000��e� 5opp-750000000�,��� 5�opp-1500000000�Yh/�ހopp-312500000��_ � 5opp-417000000���@� 5opp-625000000�%@�@� 5�opp-1250000000�J�|��B@display-subsystem6starfive,jh7110-displayverisilicon,display-subsystem� �okaydsi-output8starfive,jh7110-display-encoderverisilicon,dsi-encoder�okayports port@0dendpoint�
ILport@1dendpoint� ITmailbox_clientstarfive,mailbox-test�rxtx�  �okayrgb-output3starfive,jh7110-rgb_outputverisilicon,rgb-encoder �disabledports port@0 dendpoint@0d� IJstmmac-axi-config���@ IAtda988x_pinstarfive,tda998x_rgb_pin �disabledsoc simple-bus  ,)clint@2000000 riscv,clint0d0controlP:�cache-controller@2010000sifive,fu740-c000-ccachecache0d@
0controlsidebandNv@Y�� esIplic@c000000 riscv,plic0d 0controlH:         �����I serial@10000000snps,dw-apb-uartd��x��baudclkapb_pclk�STN �okay�default�serial@10010000snps,dw-apb-uartd��x��baudclkapb_pclk�UVN!�okay�default�serial@10020000snps,dw-apb-uartd��x��baudclkapb_pclk�WXN" �disabledi2c@10030000snps,designware-i2cdx%� refpclk�LN# �okay9���,����default�i2c@10040000snps,designware-i2cdx&� refpclk�MN$  �disabledi2c@10050000snps,designware-i2cdx'� refpclk�NN% �okay9���,����default�seeed_plane_i2c@45 seeed_paneldEportendpoint�IRtinker_ft5406@38tinker_ft5406d8touchscreen@14 goodix,gt911d 0 :panel_radxa@19starfive_jadardd F Qportendpoint�ISspi@10060000arm,pl022arm,primecelldx� apb_pclk�E]rst_apbN&i"� �okay�default�spi@0rohm,dh2228fv�����d�okayspi@10070000arm,pl022arm,primecelldx� apb_pclk�F]rst_apbN'i"�  �disabledspi@10080000arm,pl022arm,primecelldx� apb_pclk�G]rst_apbN(i"�  �disabledtdm@10090000starfive,jh7110-tdmd ,x����4tdm_ahbtdm_apbtdm_internaltdmmclk_innertdm_ext�ikj��rxtx� �disabled�default�spdif@100a0000starfive,jh7110-spdifd
,x��*apbcoreaudrootmclk_innermclk_extmclk�_]apbNT�tx� �disabledpwmdac@100b0000starfive,jh7110-pwmdacd x ��apb0apbcore�`]apb��tx��okay�default� I]pdm@100d0000starfive,jh7110-pdmd 0pdmx��#pdm_mclkpdm_apbclk_mclkmclk_ext�ab]pdm_dmicpdm_apb� �disabledi2srx_mst@100e0000starfive,jh7110-i2srx-masterd<x �����3apb0apbbclk_mstlrck_mstbclklrckmclkmclk_ext�cd ]apbbclk��rx �!4� �disabledi2srx_3ch@100e0000starfive,jh7110-i2srxdTx �����"#Zapb0apbaudiorootmclk_innerbclk_mstlrck_mstbclklrckmclkmclk_extbclk_extlrck_ext�cd��rx �!4� �disabled�default�$%usbdrdstarfive,jh7110-cdns3 d! 8x_������125mapplpmstbapbaxiutmi �����]pwrupapbaxiutmi�&�H��!�okay �) peripheralusb@10100000
cdns,usb30d 0otgxhcidev Ndln�hostperipheralotg(cdns3,usb3-phycnds3,usb2-phy 2super-speedmulti-phyctrl@10210000starfive,phyctrld!IUpcie1-phyctrl@10220000starfive,phyctrld"IXclock-controllerstarfive,jh7110-clkgen0d# 0sysstgaon8x'()*+"#,-./0�oscgmac1_rmii_refingmac1_rgmii_rxini2stx_bclk_exti2stx_lrck_exti2srx_bclk_exti2srx_lrck_exttdm_extmclk_extjtag_tck_innerbist_apbclk_rtcgmac0_rmii_refingmac0_rgmii_rxin,$�! $(,04Ireset-controllerstarfive,jh7110-resetPd#�)\$0syscrgstgcrgaoncrgispcrgvoutcrg@Ixrp cdns,xrp d#$x� core_clk���]rst_corerst_axi�&
Mhifi4_elf  )@ i�i��okay[1dsp@0stg_syscon@10240000syscond$I&serial@12000000snps,dw-apb-uartd��x��baudclkapb_pclk�YZN- �disabledserial@12010000snps,dw-apb-uartd��x��baudclkapb_pclk�[\N. �disabledserial@12020000snps,dw-apb-uartd��x��baudclkapb_pclk�]^N/ �disabledi2c@12030000snps,designware-i2cdx(� refpclk�ON0  �disabledi2c@12040000snps,designware-i2cdx)� refpclk�PN1  �disabledi2c@12050000snps,designware-i2cdx*� refpclk�QN2 �okay9���,����default�2eeprom@50 atmel,24c04dPiaxp15060_reg@36x-powers,axp15060d6regulatorsALDO1r�aldo1 �mipi_0p9� ��� ��ALDO5r�aldo5 �hdmi_0p9� ��� ��ALDO3r�aldo3 �hdmi_1p8�w@�w@ALDO4r��aldo4 �sdio_vdd�w@�w@I>DCDC1r��dcdc1�vcc_3v3�2Z��2Z�I=DCDC2r��dcdc2�cpu_vdd�� ��Ii2c@12060000snps,designware-i2cdx+� refpclk�RN3 �okay9���,����default�3imx219@10 sony,imx219dx4xclk F��portendpoint�5
 !1.IDimx708@1a sony,imx708dx4 Fportendpoint�6B1�t�IEov4689@36 ovti,ov4689d6x4xclk��portendpoint�7
IFspi@12070000arm,pl022arm,primecelldx� apb_pclk�H]rst_apbN4i"�  �disabledspi@12080000arm,pl022arm,primecelldx� apb_pclk�I]rst_apbN5i"�  �disabledspi@12090000arm,pl022arm,primecelld x� apb_pclk�J]rst_apbN6i"�  �disabledspi@120A0000arm,pl022arm,primecelld
x� apb_pclk�K]rst_apbN7i"�  �disabledi2stx_4ch0@120b0000starfive,jh7110-i2stx-4ch0d <x�����9mclk_innerbclk_mstlrck_mstmclkbclklrckapbmclk_ext�ef ]apbbclk�/�tx��okay�default�8Idi2stx_4ch1@120c0000starfive,jh7110-i2stx-4ch1d \x���� �*+aaudrootmclk_innerbclk_mstlrck_mstmclkbclklrckmclk_outapb0apbmclk_extbclk_extlrck_ext�gh�0�tx� �disabled�default�9pwm@120d0000starfive,jh7110-pwmd 0controlxy�lV��kv�okay�default�:tmon@120e0000starfive,jh7110-tempdNQx��
sensebus�|{
]sensebus��okayI`spi@13010000cdns,qspi-nor  d!@N(xZX
WY%clk_refclk_apbahb1clk_ahbclk_src�>=?����沀nor-flash@0jedec,spi-nord������� �okaypartitionsfixed-partitions spl@0duboot-env@100000duboot@100000d0data@f00000d�sys_syscon@13030000syscondI!gpio@13040000starfive,jh7110-sys-pinctrld0controlxp�NV�#@Ii2c0-pinsIi2c0-pins-scl*98� pH ^u� i2c0-pins-sda*:8��H ^u�
i2c5-pinsI2i2c5-pins-scl*8��H ^u*�Oi2c5-pins-sda*8�H ^u+�Pi2c6-pinsI3i2c6-pins-scl*8�pH ^u.�Vi2c6-pins-sda*8��H ^u/�Wpwmdac0-pinsI pwmdac0-pins-left*!8� H ^upwmdac0-pins-right*"8� pH ^upwm-pinsI:pwm_ch0-pins*.8��H^u pwm_ch1-pins*;8�H^u
ssp0-pinsIssp0-pins_tx*48�H^ ussp0-pins_rx*58� Hu�ssp0-pins_clk*08��H^ussp0-pins_cs*18�H^upcie0_perst_defaultperst-pins*8�H^upcie0_perst_activeperst-pins*8�H^upcie0_wake_defaultIVwake-pins* 8��Hupcie0_clkreq_defaultIWclkreq-pins*8��Hupcie1_perst_defaultperst-pins*8�H^upcie1_perst_activeperst-pins*8�H^upcie1_wake_defaultIYwake-pins*8�8Hupcie1_clkreq_defaultIZclkreq-pins*8�8Huusb-pinsdrive-vbus-pin*8��H^ui2srx-pinsI%i2srx-pins0*=8�Hu�i2s-clk0I$i2s-clk0_bclk*&8��H�!ui2s-clk0_lrclk*?8��H�" ui2stx-pinsI9i2stx-pins0*,8� H^Eutdm0-pinsItdm0-pins-tx*,8� H^)utdm0-pins-rx*=8�Hu�$tdm0-pins-sync*?8��Hu�%tdm0-pins-pcmclk*&8��Hu�#uart0-pinsIuart0-pins-tx*H^uuart0-pins-rx*8�H u�uart1-pinsIuart1-pins-tx*<H^Duuart1-pins-rx*=8�H u�7i2c2-pinsIi2c2-pins-scl*H ^u�;i2c2-pins-sda*H ^u�<mmc0-pinsI?mmc0-pins-rest*>8�8H ^ummc0-pins-cLK*@H-mmc0-pins-cmd*AH mmc0-pins-data0*BH mmc0-pins-data1*CH mmc0-pins-data2*DH mmc0-pins-data3*EH mmc0-pins-data4*FH mmc0-pins-data5*GH mmc0-pins-data6*HH mmc0-pins-data7*IH sdcard1-pinsI@sdcard1-pins0*
8�H-^7usdcard1-pins1* 8�H ^9u�,sdcard1-pins2* 8��H ^:u�-sdcard1-pins3* 8�H ^;u�.sdcard1-pins4*8�H ^<u�/sdcard1-pins5*8��H ^=u�0inno_hdmi-pinsIMinno_hdmi-scl*H ^ u�inno_hdmi-sda*H ^ u�inno_hdmi-cec-pins*H u^
�inno_hdmi-hpd-pins*Hu�mclk_ext_pinsI8mclk_ext_pins*H�utimer@13050000starfive,jh7110-timersdNEFGH�timer0timer1timer2timer3(x}~�|$timer0timer1timer2timer3apb_clk(�vwxyu$]timer0timer1timer2timer3apb_rst9n6mailbox@13060000starfive,mail_boxdxqclk_apb�D]mbx_rreN��okayI wdog@13070000starfive,jh7110-wdtdND�wdogx{zcore_clkapb_clk�mn]rst_apbrst_core�jpu@13090000 starfive,jpud N xBCDL!axi_clkcore_clkapb_clknoc_bus�,-.]rst_axirst_corerst_apb�;�okayvpu_dec@130A0000starfive,vdecd
N (xFGHIL(axi_clkbpu_clkvce_clkapb_clknoc_bus(�/0125)]rst_axirst_bpurst_vcerst_apbrst_sram��;�okayvpu_enc@130B0000starfive,vencd N(xNOPQR(axi_clkbpu_clkvce_clkapb_clknoc_bus(�6789:)]rst_axirst_bpurst_vcerst_apbrst_sram��;�okaycan@130d0000starfive,jh7110-canipms,cand Npxsutapb_clkcore_clktimer_clk�opq]rst_apbrst_corerst_timer?bZ�!� �disabledcan@130e0000starfive,jh7110-canipms,candNqxvxwapb_clkcore_clktimer_clk�rst]rst_apbrst_corerst_timer?bZ�!�� �disabledcrypto@16000000starfive,jh7110-sec d@�@0secregsecdmaN�secirqdmairqx��sec_hclksec_ahb��]sec_hre
true)true�<< �sec_msec_p�okaysec_dma@16008000arm,pl080arm,primecelli�d�@0sec_dmaNx��sec_hclkapb_pclk��]sec_hre4Kbt ��okayI<trng@1600C000starfive,jh7110-trngd�@x�� hclkahb��N�okaymmc@16010000starfive,jh7110-mmcdx[]biuciu�@]resetNJ� ���okay����]�����,{�� (�?=K>�default�?mmc@16020000starfive,jh7110-mmcdx\^biuciu�A]resetNK� ���okay����^�����,{X`gq(��default�@ethernet@16030000 starfive,dwmacsnps,dwmac-5.10ad,gtxtxptp_refstmmacethpclkgtxcrmii_rtx8xl�m��o����]ahbstmmaceth N�macirqeth_wake_irqeth_lpi �rgmii-id�@������ A ) 2 M X�okay ethernet-phy@0 c q } � �
 � �
 � � �ethernet@16040000 starfive,dwmacsnps,dwmac-5.10ad,gtxtxptp_refstmmacethpclkgtxcrmii_rtx8xdifabke�CB]ahbstmmaceth NNML�macirqeth_wake_irqeth_lpi �rgmii-id�@������ A ) 2 M X�okay ethernet-phy@1 c q } � � � � � � �dma-controller@16050000starfive,jh7110-axi-dmadx��`core-clkcfgr-clknoc-clk���NI� � �


0

Quoted 1 line

�okayIaon_syscon@17010000syscondICgpio@17020000starfive,jh7110-aon-pinctrld0control��NU�#I_power-controller@17030000starfive,jh7110-pmudNo

UI;rtc@17040000starfive,jh7110-rtcd N
�rtc_ms_pulsertc_sec_pulsertcx�� pclkcal_clk����]rst_oscrst_apbrst_cal
iB@gpu@18000000img-gpu d0�0x-01./20clk_bvclk_apbclk_rtcclk_coreclk_sysclk_axi�]rst_apbrst_doma�;NR
|z�okayvin_sysctl@19800000starfive,jh7110-vin�d������+0csi2rxvclkvrstsctrlisptrstpmusyscrg�xBBBB BB BBB B
B BBB34clk_apb_funcclk_pclkclk_sys_clkclk_wrapper_clk_cclk_dvp_invclk_axiwrclk_mipi_rx0_pxlclk_pixel_clk_if0clk_pixel_clk_if1clk_pixel_clk_if2clk_pixel_clk_if3clk_m31dphy_cfgclk_inclk_m31dphy_refclk_inclk_m31dphy_txclkesc_lan0clk_ispcore_2xclk_isp_axip�������������)*�]rst_wrapper_prst_wrapper_crst_pclkrst_sys_clkrst_axirdrst_axiwrrst_pixel_clk_if0rst_pixel_clk_if1rst_pixel_clk_if2rst_pixel_clk_if3rst_m31dphy_hwrst_m31dphy_b09_always_onrst_isp_top_nrst_isp_top_axi �C�;N\WXYZ�okayports port@1d endpoint@0d�D
 !�okayI5endpoint@1d�E
 !�okayI6endpoint@2d�F
�okayI7clock-controller@19810000starfive,jh7110-clk-ispd�0isp, x 345�u0_dom_isp_top_clk_dom_isp_top_clk_dvpu0_dom_isp_top_clk_dom_isp_top_clk_ispcore_2xu0_dom_isp_top_clk_dom_isp_top_clk_isp_axiu0_sft7110_noc_bus_clk_isp_axi�)*0]rst_isp_top_nrst_isp_top_axirst_isp_noc_bus_n�;IBdc8200@29400000*starfive,jh7110-dc8200verisilicon,dc8200
�G0d)@)@ N_tx<:>=HHHHH>H IHH'H(�noc_dispvout_srctop_vout_axitop_vout_ahbpix_clkvout_pix1axi_clkcore_clkvout_ahbvout_top_axivout_top_lcdhdmitx0_pixelclkdc8200_pix0dc8200_pix0_outdc8200_pix1_out(�+���3]rst_vout_srcrst_axirst_ahbrst_corerst_noc_disp�okayport endpoint@0d�JI endpoint@1d�KINendpoint@2d�LI
hdmi@29590000starfive,jh7110-hdmiinno,hdmid)Y@NcxHHHIsysclkmclkbclkpclk��]hdmi_tx��okay�default�M
�Ieport endpoint@0d�NIKdssctrl@295B00004starfive,jh7110-dssctrlverisilicon,dss-ctrlsyscond)[�IGclock-controller@295C0000starfive,jh7110-clk-voutd)\0voutxIOP:=Nhdmitx0_pixelclkmipitx_dphy_rxescmipitx_dphy_txbytehsvout_srcvout_top_ahb�+ ]vout_src,�;IHmipi@295d0000"starfive,jh7110-mipi_dsicdns,dsid)]Nb0dsi xH H
H H dpiapbtxescsys0�������9]dsi_dpidsi_apbdsi_rxescdsi_sysdsi_txbytehsdsi_txesc
�Q(dphy�okayports port@0d endpoint@0d�RIendpoint@1d�SIport@1dendpoint�TI mipi-dphy@295e0000.starfive,jh7110-mipi-dphy-txm31,mipi-dphy-txd)^xH dphy_txesc���]dphy_sysdphy_txbytehs
��okayIQpcie@2B000000.starfive,jh7110-pcieplda,pci-xpressrich3-axi � d+ @ 0regconfighpci�&��0�
�U(�
��8)�00� @
� N8��msi 
�`     0�������3]rst_mst0rst_slv0rst_slvrst_brgrst_corerst_apb x`���noctlaxi_mst0apb�okay�default�VW :pcie@2C000000.starfive,jh7110-pcieplda,pci-xpressrich3-axi � d, � 0regconfighpci�&pt�h
�X(�
��8)�88� � �@
� N9��msi 
�`     0�������3]rst_mst0rst_slv0rst_slvrst_brgrst_corerst_apb x`���noctlaxi_mst0apb�okay�default�YZ :e24 starfive,e24 dn!n!� 0ecmdespacex���clk_rtcclk_coreclk_dbg�� ]e24_core�& Me24_elf �txrx�   )l�l�`�okay[[dsp@0pwmdac-transmitterstarfive,jh7110-pwmdac-dit��okayI^snd-card3simple-audio-card  Starfive-PWMDAC-Sound-Cardsimple-audio-card,dai-link@0d 5left_j <\ L\cpu Y]I\codec Y^aliases c/soc/spi@13010000 h/soc/gpio@13040000 n/soc/ethernet@16030000 x/soc/ethernet@16040000 �/soc/mmc@16010000 �/soc/mmc@16020000 �/soc/serial@10000000 �/soc/serial@10010000 �/soc/serial@12000000 �/soc/i2c@10030000 �/soc/i2c@10040000 �/soc/i2c@10050000 �/soc/i2c@12030000 �/soc/i2c@12040000 �/soc/i2c@12050000 �/soc/i2c@12060000chosen �F �L �serial0:115200 �debug console=ttyS0 rootwaitmemory@40000000hmemoryd@reserved-memory )linux,cmashared-dma-pool � 
 p  !e24@c0000000dl�`I[xrpbuffer@f0000000@di����k�k���l�I1leds
gpio-ledsled-ack 4_ 3
9heartbeat
Bheartbeat Xackthermal-zonescpu-thermal ^� t:� �`tripscpu_alert0 �L ��opassiveIacpu_crit ��� � ocriticalcooling-mapsmap0 �a0 �b��������������������������������snd-card1simple-audio-card  Starfive-HDMI-Sound-Cardsimple-audio-card,dai-link@0d 5i2s <c Lc ��okaycpu YdIccodec Yegpio-restart gpio-restart 4#�� compatible#address-cells#size-cellsmodel#clock-cellsclock-frequencyphandletimebase-frequencyregdevice_typei-cache-block-sizei-cache-setsi-cache-sizenext-level-cacheriscv,isa#cooling-cellsstatusinterrupt-controller#interrupt-cellsd-cache-block-sized-cache-setsd-cache-sized-tlb-setsd-tlb-sizei-tlb-setsi-tlb-sizemmu-typetlb-splitoperating-points-v2clocksclock-namescpu-supplycpuopp-sharedopp-hzopp-microvoltopp-suspendportsremote-endpointmbox-namesmboxessnps,wr_osr_lmtsnps,rd_osr_lmtsnps,bleninterrupt-parentrangesreg-namesinterrupts-extendedinterruptscache-levelcache-unifieduncached-offsetriscv,max-priorityriscv,ndevreg-io-widthreg-shiftresetspinctrl-namespinctrl-0i2c-sda-hold-time-nsi2c-sda-falling-time-nsi2c-scl-falling-time-nsauto_calc_scl_lhcntirq-gpiosreset-gpiosreset-gpioenable-gpioreset-namesarm,primecell-periphidnum-cspl022,com-modespi-max-frequencydmasdma-names#sound-dai-cellsinterrupt-namesstarfive,sys-sysconstarfive,stg-sysconstarfive,usb2-onlydr_modedma-coherentphy-namesmaximum-speed#reset-cellsfirmware-namememory-regionpagesizeregulator-boot-onregulator-compatibleregulator-nameregulator-min-microvoltregulator-max-microvoltregulator-always-onrotationorientationbus-typeclock-lanesdata-laneslane-polaritieslink-frequenciesclock-noncontinuousstarfive,approx-freq#pwm-cellsstarfive,npwm#thermal-sensor-cellscdns,fifo-depthcdns,fifo-widthcdns,trigger-addresscdns,read-delaycdns,tshsl-nscdns,tsd2d-nscdns,tchsh-nscdns,tslch-ns#gpio-cellsngpiosstarfive,pinsstarfive,pinmuxstarfive,pin-ioconfigstarfive,pin-gpio-doutstarfive,pin-gpio-doenstarfive,pin-gpio-din#mbox-cellstimeout-secpower-domainsstarfive,vdec_noc_ctrlstarfive,venc_noc_ctrlsyscon,can_or_canfdenable-side-channel-mitigationenable-dmalli-bus-interface-ahb1mem-bus-interface-ahb1memcpy-burst-sizememcpy-bus-width#dma-cellsfifo-watermark-aligneddata-addrassigned-clocksassigned-clock-ratescard-detect-delaycap-mmc-highspeedmmc-hs200-1_8vnon-removablecap-mmc-hw-resetpost-power-on-delay-msvmmc-supplyvqmmc-supplyno-sdiono-mmcbroken-cdcap-sd-highspeedphy-modesnps,multicast-filter-binssnps,perfect-filter-entriesrx-fifo-depthtx-fifo-depthsnps,fixed-burstsnps,no-pbl-x8snps,force_thresh_dma_modesnps,axi-configsnps,tsosnps,en-tx-lpi-clockgatingsnps,txpblsnps,rxpblrgmii_sw_dr_2rgmii_sw_drrgmii_sw_dr_rxcrxc_dly_enrx_delay_seltx_delay_sel_fetx_delay_seltx_inverted_10tx_inverted_100tx_inverted_1000dma-channelssnps,dma-masterssnps,data-widthsnps,block-sizesnps,prioritysnps,axi-max-burst-len#power-domain-cellsrtc,cal-clock-freqcurrent-clockstarfive,aon-sysconverisilicon,dss-sysconhpd-gpiophys#phy-cellsstarfive,phyctrlbus-rangemsi-parentinterrupt-map-maskinterrupt-mapirq-modesimple-audio-card,nameformatbitclock-masterframe-mastersound-daispi0gpio0ethernet0ethernet1mmc0mmc1serial0serial1serial3i2c0i2c1i2c2i2c3i2c4i2c5i2c6linux,initrd-startlinux,initrd-endstdout-path#bootargsreusablealignmentalloc-rangeslinux,cma-defaultcolorfunctionlinux,default-triggerlabelpolling-delay-passivepolling-delaythermal-sensorstemperaturehysteresistripcooling-devicemclk-fs

maintainer
#4 lore raw
Quoted 9 lines · WHR
Quoted 9 lines · WHR
Quoted 6 lines

Commit 935df1bd40d43c4ee91838c42a20e9af751885cc has removed an assignment statement for 'out_irq->np' right after label 'skiplevel', causing the new parent acquired from function of_irq_find_parent didn't being stored to 'out_irq->np' as it supposed to. Under some conditions this can resuit in multiple corruptions and leakages to device nodes.

Quoted 4 lines
Quoted 1 line

Under what conditions? Please provide a specific platform and DT.

I have a previous email sent to you before I came up with the fix. The kernel log for debugging and the device tree blob are attached again.

Thanks. The patch needs to stand on its own with this detail, not require that I've read (and remember) some other email among the 1000s.

"multiple corruptions and leakages to device nodes" is meaningless. Be exact, it's device_node refcounts we're talking about. The issue is out_irq->np is not updated from 'usbdrd' node to the real interrupt parent, the 'plic' node. In the next iteration of the loop, we find 'interrupt-controller' in the plic node and return, but out_irq is not pointing to the plic. Then of_irq_get() fails to get the irq host and does a put on out_irq->np which is usbdrd, not plic node.

So please update the commit msg and provide your name, not initials.

Quoted 9 lines
Quoted 6 lines

Honestly, I think the DT is wrong if you get to this point. We'd have to have the initial interrupt parent with #interrupt-cells, but not an interrupt-controller nor interrupt-map property to get here. Maybe that happens in some ancient platform, but if so, I want to know which one and what exactly we need to handle.

So you suggest the #interrupt-cells is erroneous in that node, and should be removed?

Yes. dtc warns about this. dtschema would too if there was a schema (there is, but not since you use a downstream binding).

The clint node has the same issue.

Quoted 2 lines

This is a device vendor-provided DT, so any issue in it will have to be fixed locally.

Complain to your vendor...

Rob

author
#5 lore raw
Quoted 28 lines · WHR
Quoted 9 lines
Quoted 9 lines · WHR
Quoted 6 lines

Commit 935df1bd40d43c4ee91838c42a20e9af751885cc has removed an assignment statement for 'out_irq->np' right after label 'skiplevel', causing the new parent acquired from function of_irq_find_parent didn't being stored to 'out_irq->np' as it supposed to. Under some conditions this can resuit in multiple corruptions and leakages to device nodes.

Quoted 5 lines
Quoted 1 line

Under what conditions? Please provide a specific platform and DT.

I have a previous email sent to you before I came up with the fix. The kernel
log for debugging and the device tree blob are attached again.

Thanks. The patch needs to stand on its own with this detail, not require that I've read (and remember) some other email among the 1000s.

"multiple corruptions and leakages to device nodes" is meaningless. Be exact, it's device_node refcounts we're talking about. The issue is out_irq->np is not updated from 'usbdrd' node to the real interrupt parent, the 'plic' node. In the next iteration of the loop, we find 'interrupt-controller' in the plic node and return, but out_irq is not pointing to the plic. Then of_irq_get() fails to get the irq host and does a put on out_irq->np which is usbdrd, not plic node.

Quoted 1 line

So please update the commit msg and provide your name, not initials.

Since the fix for this regression is really trivial, I think you'll be able to commit it by yourself instead.

Quoted 13 lines
Quoted 9 lines
Quoted 5 lines

Honestly, I think the DT is wrong if you get to this point. We'd have to have the initial interrupt parent with #interrupt-cells, but not an interrupt-controller nor interrupt-map property to get here. Maybe that happens in some ancient platform, but if so, I want to know which one and what exactly we need to handle.

So you suggest the #interrupt-cells is erroneous in that node, and should be
removed?

Yes. dtc warns about this. dtschema would too if there was a schema (there is, but not since you use a downstream binding).

Quoted 7 lines

The clint node has the same issue.

Quoted 3 lines

This is a device vendor-provided DT, so any issue in it will have to be fixed
locally.

Complain to your vendor...

Thanks for help diagnosing the issues.

author
#6 lore raw
In reply to Rob Herring
Quoted 12 lines · WHR
Quoted 11 lines
Quoted 10 lines · WHR
Quoted 6 lines

Commit 935df1bd40d43c4ee91838c42a20e9af751885cc has removed an assignment statement for 'out_irq->np' right after label 'skiplevel', causing the new parent acquired from function of_irq_find_parent didn't being stored to 'out_irq->np' as it supposed to. Under some conditions this can resuit in multiple corruptions and leakages to device nodes.

Under what conditions? Please provide a specific platform and DT.

Quoted 7 lines
Quoted 3 lines

I have a previous email sent to you before I came up with the fix. The kernel
log for debugging and the device tree blob are attached again.

Thanks. The patch needs to stand on its own with this detail, not require that I've read (and remember) some other email among the 1000s.

For referencing the mentioned email in mailing list archive:
https://lore.kernel.org/linux-devicetree/a373cf98c2d35f2bd828261f078471a5.squirrel@_/