Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3326215rwa; Tue, 23 Aug 2022 02:54:36 -0700 (PDT) X-Google-Smtp-Source: AA6agR75Yd4t/6xmM53FSMuS0iZ4UpvpGFEDV/46ur3/yprklohdcVOaM9GK32vo7Lpzk1LwBUky X-Received: by 2002:a17:90b:3509:b0:1fb:35ed:6fd4 with SMTP id ls9-20020a17090b350900b001fb35ed6fd4mr2561799pjb.1.1661248476401; Tue, 23 Aug 2022 02:54:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661248476; cv=none; d=google.com; s=arc-20160816; b=MA7QUoQjWvvig7QBwbz3JOn5RMRD5iu2fchc0OmT26/pEQ7nlV0th2RrZ8U3544Msi RbXU4gxijW3PK86VzMC1cFcNq3tw3/Ut+GzBBe5WOADVJZuMsovkHkN5brzUYcjqAF4n 9Gv26RUKajvrRW5aTyOQR8TO4vCxFwWpVbJyErD+PjrlRTYaAgxlRKpg/BLQHAR1k0DB 8qdKHZAMmoCrQDghBqapymkPHxYppSNWy4QehW4WUbtJz1F7pKTS7K6CoI2dNvAgryvR BnLvNVuFZAWRWCiEmy46+zRQH69C5IKMMtbLvkj0ItNbPz0AmzAj5P5AtEXq/1xL/leP 7WYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=vjlbQ9NKGv/3BccFdajztY4rht1H2t/zU/wrDmHjMt8=; b=W8Fqw8zZux/kD/4wsnjt5Nw4aT1kHcvKwpg0n1+T2DED/Uuksr7GBuLsD352xDdvKj JbgDjGCJAJTz04R4z+WYwTC5zxRpZk5ccNWftMX6x814GvqRSTP6x2juawxP0qtQjeQr e5kMJ376ML1rZ3mCr/ns56xqFEe5Se9VgX0D1ELA3C7TlqIWAwNavxxz7t53PVXPAOz8 MnDsVc1UXv9tz0jc7wA5pc1A+gqByp2nUqts618R+RUspdawZsU9O21PbOWNNnZ1Yq4t /6gYAu/dHBWwbCB95y8Xd3XYvI1MmXWLJuADzG10AXDlxRagPLEJNWln4T7+SeNYeFha p18Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hnf+XXwi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s11-20020a632c0b000000b0041b42d079dbsi15347089pgs.792.2022.08.23.02.54.24; Tue, 23 Aug 2022 02:54:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=hnf+XXwi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347074AbiHWInY (ORCPT + 99 others); Tue, 23 Aug 2022 04:43:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347835AbiHWIlH (ORCPT ); Tue, 23 Aug 2022 04:41:07 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B564792FE; Tue, 23 Aug 2022 01:19:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5F88D61238; Tue, 23 Aug 2022 08:18:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 67BF1C433C1; Tue, 23 Aug 2022 08:18:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661242688; bh=X32xtPBWcVE6Z6gxu3/jbMLK/pP7I1mcOKV4OxfaTWk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hnf+XXwi8AS0mgoaAvjKjgHElB21FC8VL98DwqMZrIRQBIQuVU12huz+JId8cK3WW JWln4XdpjNWI+gtwJwD9cek05OmBb2dpIMTtbMtBOlq9/gAuQDuOqYVezuIcWA3AIY cqT9tPcTmhyhBghcBdtawnAjoyznSQk7+67j+yN4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alan Stern , Liang He , Sasha Levin Subject: [PATCH 4.9 088/101] usb: host: ohci-ppc-of: Fix refcount leak bug Date: Tue, 23 Aug 2022 10:04:01 +0200 Message-Id: <20220823080037.906064363@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080034.579196046@linuxfoundation.org> References: <20220823080034.579196046@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Liang He [ 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 --- 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 4f87a5c61b08..d22a70363fbf 100644 --- a/drivers/usb/host/ohci-ppc-of.c +++ b/drivers/usb/host/ohci-ppc-of.c @@ -168,6 +168,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); -- 2.35.1