bcmasp_probe() calls of_find_node_by_name(dev->of_node, "ethernet-ports"), which unconditionally drops the from-node reference the caller never held. Every probe or bind cycle that reaches the port scan, including ones that later fail with "No ports found", drains the asp node refcount by one. Once it hits zero, of_node_release() deadlocks in its error printk (%pOF on the parent while holding devtree_lock with IRQs off), so the machine freezes silently with nothing on the console. Use of_get_child_by_name() which leaves the parent reference alone. Signed-off-by: Wang Haoran Fixes: 490cb412007d ("net: bcmasp: Add support for ASP2.0 Ethernet controller") --- diff --git a/drivers/net/ethernet/broadcom/asp2/bcmasp.c b/drivers/net/ethernet/broadcom/asp2/bcmasp.c index a59a006cea3a..af9e14214987 100644 --- a/drivers/net/ethernet/broadcom/asp2/bcmasp.c +++ b/drivers/net/ethernet/broadcom/asp2/bcmasp.c @@ -1342,7 +1342,7 @@ static int bcmasp_probe(struct platform_device *pdev) bcmasp_init_wol(priv); - ports_node = of_find_node_by_name(dev->of_node, "ethernet-ports"); + ports_node = of_get_child_by_name(dev->of_node, "ethernet-ports"); if (!ports_node) { dev_warn(dev, "No ports found\n"); ret = -EINVAL; --- PoC reproduction (7.4.0-rc2, arm64 QEMU virt, unmodified kernel): Device tree injection, spliced into the QEMU virt machine DT: reserved-memory { #address-cells = <2>; #size-cells = <2>; ranges; asp-regs@7f000000 { no-map; reg = <0x0 0x7f000000 0x0 0x200000>; }; }; asp@7f000000 { compatible = "brcm,asp-v2.2"; reg = <0x0 0x7f000000 0x0 0x200000>; interrupt-parent = <&gpio0>; interrupts = <4 2>; }; The node has no ethernet-ports child, so every probe passes through the of_find_node_by_name() call and then fails with "No ports found". Trigger (repeated bind cycles): modprobe bcm-asp echo "7f000000.asp" > /sys/bus/platform/drivers/brcm,asp-v2/bind echo "7f000000.asp" > /sys/bus/platform/drivers/brcm,asp-v2/bind Result: brcm,asp-v2 7f000000.asp: Failed to init WoL irq: -6 brcm,asp-v2 7f000000.asp: No ports found MARK: probe1 done MARK: bind -> probe2 MARK: bind -> probe3 (no further output) The third probe drives the asp node refcount to zero and the machine freezes inside of_node_release(). Control: with the same DT minus the interrupt properties the probe fails before this call and three or more bind cycles run clean. Note: the PoC was generated with AI assistance and the vulnerability was found by static analysis. The device tree is trusted input (a bad DT requires root or physical access), so this is not a security fix, but it prevents a potential resource leak or system failure on a failed probe or an old or malformed DT.