Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp447370iog; Mon, 13 Jun 2022 06:09:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxueedxK/yBqXYINKcUuVtcx0cl7Nnq4Ll0D5OpXZr4C/UpKZD9357BIxtkYlUFBB1ldR2/ X-Received: by 2002:a17:907:7b86:b0:711:d2c8:ab18 with SMTP id ne6-20020a1709077b8600b00711d2c8ab18mr34384832ejc.580.1655125440846; Mon, 13 Jun 2022 06:04:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655125440; cv=none; d=google.com; s=arc-20160816; b=a4OINahu3YST+wr3OhEpTIIq508IcMBnu2eg3FJIMBe9DKB3A1sSxlJj0CGToqM94j v/y4g7wLIRvVrF5zCNX3UOmKzrHQsgpHCLBtZNjtyGbK0BSf9P4pTYYDJ6i4Dpa4nKME jaLeK2AJtN6X9HzCEhEQlYlW0xAecVgmBisTYckOy9ou5jQB1AyvTZvqZiCnjPcf3Utx BpI8Cj435L/QX7phNmAgFqEF657yC5PRGB2ECTMNCAgkQ1s0yG3lLpk/+2INHh4pDgso qoDr4R6W6ghpeEbAsExG+rii2LtHa0eEVmQeKKqiN0ycxDu5Thw6eudFKkyKYEUlAAHZ 9fFA== 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=b0IQ3hlm1s/ShpFZAJgac2EUDq3J1AJTjUwmArcg1vE=; b=l618Szsf6Lc888hGi2qNLNleCH4ZL8039uGthi+pt5yByjYcPQWV16mO4GIVrYZSAF S1AjyLJ/mzyhb6bUJEud25PDk+94dLt1+99PmLKtBHanCz3aR2sUhxo35UFZWROkXGBT 4ETDeroKdIZ623SKum+hIw+zyDY38B1AFZP8/gdBrziUTBWLtHICm8mv+NLCkymd2OPN X13eViUAEJENLcrDTv9zrDG6YwKwkCHV23BjsTYGEUNMx9bbdv74UpRbLvBCRhTRxYIX IVKjYP+FjeeqnwWkmYR8M4T92YyaYtIn4Gr3LNW1Uw3HwmLza1ULIxM3bfzparXNSRLE pRfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mkM6bV0D; 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 dt4-20020a170907728400b0071256ff7906si8880907ejc.692.2022.06.13.06.03.30; Mon, 13 Jun 2022 06:04:00 -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=mkM6bV0D; 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 S1344292AbiFMKnG (ORCPT + 99 others); Mon, 13 Jun 2022 06:43:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344859AbiFMKlN (ORCPT ); Mon, 13 Jun 2022 06:41:13 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76AA722B0A; Mon, 13 Jun 2022 03:23:46 -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 12A7460AEB; Mon, 13 Jun 2022 10:23:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1E1B8C3411C; Mon, 13 Jun 2022 10:23:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655115825; bh=lmlUxpqSq8SeGyucPtyJ86223H3HnhRr2pO7KXDiykQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mkM6bV0DVeKhD8HTfj9dIgySd4Mwi78BaqpOiiOYZU3xRKdiC+2yxh7Yw/2pkrvYz vOdfq6v883CFv0w2oDZnXBM9wH0eU6LhZvL7YeIi/y5VeVMkq55kAzIo3nLkvbpvX/ fg8oNbYm/YxndTseBtoHJqjXedVrdILEcoLhMscc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zeal Robot , Lv Ruyi , Michael Ellerman , Sasha Levin Subject: [PATCH 4.14 044/218] powerpc/xics: fix refcount leak in icp_opal_init() Date: Mon, 13 Jun 2022 12:08:22 +0200 Message-Id: <20220613094918.840412162@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094908.257446132@linuxfoundation.org> References: <20220613094908.257446132@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.3 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: Lv Ruyi [ Upstream commit 5dd9e27ea4a39f7edd4bf81e9e70208e7ac0b7c9 ] The of_find_compatible_node() function returns a node pointer with refcount incremented, use of_node_put() on it when done. Reported-by: Zeal Robot Signed-off-by: Lv Ruyi Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220402013419.2410298-1-lv.ruyi@zte.com.cn Signed-off-by: Sasha Levin --- arch/powerpc/sysdev/xics/icp-opal.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/sysdev/xics/icp-opal.c b/arch/powerpc/sysdev/xics/icp-opal.c index c71d2ea42627..3c9dd871491e 100644 --- a/arch/powerpc/sysdev/xics/icp-opal.c +++ b/arch/powerpc/sysdev/xics/icp-opal.c @@ -199,6 +199,7 @@ int icp_opal_init(void) printk("XICS: Using OPAL ICP fallbacks\n"); + of_node_put(np); return 0; } -- 2.35.1