From 21560064e934274e8d1b5f8e0bb14db0276d3c6d Mon Sep 17 00:00:00 2001 From: Liang He Date: Fri, 4 Jul 2025 15:31:53 +0800 Subject: [PATCH] usb: host: ohci-ppc-of: Fix refcount leak bug stable inclusion from stable-v4.19.256 commit ec583e300aee9f152a64911445092d18e1c36729 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/ICG8ST CVE: CVE-2022-50033 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ec583e300aee9f152a64911445092d18e1c36729 -------------------------------- [ Upstream commit 40a959d7042bb7711e404ad2318b30e9f92c6b9b ] In ohci_hcd_ppc_of_probe(), of_find_compatible_node() will return a node pointer with refcount incremented. We should use of_node_put() when it is not used anymore. Acked-by: Alan Stern Signed-off-by: Liang He Link: https://lore.kernel.org/r/20220617034637.4003115-1-windhl@126.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin Signed-off-by: Wang ShaoBo --- drivers/usb/host/ohci-ppc-of.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/host/ohci-ppc-of.c b/drivers/usb/host/ohci-ppc-of.c index 76a9b40b08f1..96c5c7655283 100644 --- a/drivers/usb/host/ohci-ppc-of.c +++ b/drivers/usb/host/ohci-ppc-of.c @@ -169,6 +169,7 @@ static int ohci_hcd_ppc_of_probe(struct platform_device *op) release_mem_region(res.start, 0x4); } else pr_debug("%s: cannot get ehci offset from fdt\n", __FILE__); + of_node_put(np); } irq_dispose_mapping(irq); -- Gitee