Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6BFB72777F3 for ; Wed, 21 Jan 2026 01:39:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768959540; cv=none; b=VuBqfvf8zdp+KMeN9KdnGkJQ+e/YyW5/nZBwYU551RxFuUy3vSqki6XXoruw+gEVS6I3+TgUmZlwQ6tSQv+jj5QOJEEdoKm28p9D4A1B5TjUWSSxfA30rQbxeqR1x/3rAuxW+dgiFeyO0ndthW6qSBsQyqo3wU0cRjsjOKBXyWo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768959540; c=relaxed/simple; bh=y0ZiPG3MjWV44T3YHMqO3nCXNMuRIXXv0g1XuXE6VDg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ixwCT24U2uje8KbQESslhzyDy3szb0jSP2L1DU3e3Q5CG/cEiVpLavCOWKaPf5nmmo/q29M/x+D2gsfh4E0L+quKhwXdxrOKuLPU0527KQKuXWkuX1AB+BNkDyacWz9Xgudjpasd6gz++IlhHUCmWtrYFjB4ZX5GdXgAvar5bUs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=hbM3q6mf; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="hbM3q6mf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 18FC5C2BC86; Wed, 21 Jan 2026 01:38:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1768959539; bh=y0ZiPG3MjWV44T3YHMqO3nCXNMuRIXXv0g1XuXE6VDg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hbM3q6mfeEoHsVI7SQDxrSCDolqqV5ynEd5zxiX5hJjzMWws24WEsVea6dKi0/9qv eYU8WdCLr90o9pbSh3DfDIXwpZDTAvxGe4sWjhlgfD066L//TOHvh+oOS4yKBT2+qY dcYcLI121nxfAxtktd1+pIB6NLQSBX41k8fRyivrn3cXyxl8k/oi761UkJvRYoq7eI BqM+ahWIxrLc/6PYgi1UEBDdvgaPYoihYIxP/l2wYfjdHKxTCCV8zGzKLkb3CBYabX Dd/nNo6EgGMCN/x2uXdoW9svghLzqRcF+1ELmVIRN1cV4VVeB8LyZZtgcwoY2U2jIJ l3cmDFNrmsCCA== From: Sasha Levin To: stable@vger.kernel.org Cc: Wentao Liang , Neil Armstrong , Vinod Koul , Sasha Levin Subject: [PATCH 6.12.y 2/2] phy: rockchip: inno-usb2: Fix a double free bug in rockchip_usb2phy_probe() Date: Tue, 20 Jan 2026 20:38:56 -0500 Message-ID: <20260121013856.1104103-2-sashal@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260121013856.1104103-1-sashal@kernel.org> References: <2026012036-dress-salvaging-8848@gregkh> <20260121013856.1104103-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Wentao Liang [ Upstream commit e07dea3de508cd6950c937cec42de7603190e1ca ] The for_each_available_child_of_node() calls of_node_put() to release child_np in each success loop. After breaking from the loop with the child_np has been released, the code will jump to the put_child label and will call the of_node_put() again if the devm_request_threaded_irq() fails. These cause a double free bug. Fix by returning directly to avoid the duplicate of_node_put(). Fixes: ed2b5a8e6b98 ("phy: phy-rockchip-inno-usb2: support muxed interrupts") Cc: stable@vger.kernel.org Signed-off-by: Wentao Liang Reviewed-by: Neil Armstrong Link: https://patch.msgid.link/20260109154626.2452034-1-vulab@iscas.ac.cn Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/phy/rockchip/phy-rockchip-inno-usb2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c index 78a6dccba07a3..79b2199cff86e 100644 --- a/drivers/phy/rockchip/phy-rockchip-inno-usb2.c +++ b/drivers/phy/rockchip/phy-rockchip-inno-usb2.c @@ -1469,7 +1469,7 @@ static int rockchip_usb2phy_probe(struct platform_device *pdev) rphy); if (ret) { dev_err_probe(rphy->dev, ret, "failed to request usb2phy irq handle\n"); - goto put_child; + return ret; } } -- 2.51.0