Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2169883iof; Tue, 7 Jun 2022 22:03:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzl5iz131akRHvTT2Jl6s0m04kOSpJ0PCdVcBf/hjeK3Jd2oN/VtYKnhHeWvCeIgtipwS+G X-Received: by 2002:a17:90b:4a92:b0:1e8:2ba1:64bf with SMTP id lp18-20020a17090b4a9200b001e82ba164bfmr28680388pjb.41.1654664627938; Tue, 07 Jun 2022 22:03:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654664627; cv=none; d=google.com; s=arc-20160816; b=lsmzdhNAWTfLor5KPNZrUgj7TY+S9kL+utijD2kBRNlti6z/VoZPAmpWy0x3mtWFgL Z411nMUJXgqk39wEzv5YVHXUzRq7A2Wzlk5O8+xBElCu3ltEZdI48Lr8Rxl3QQPg+DzR aKM2FvBUORzRx963wv0cjfVNZVz5QTy/VeU4+RX/KU27uMvqh/8UqdZg1EitWBsV+rwQ xxmO+cJ6qXJyfow1VaqmcVCN8w9FwdTWej8OVy/IMIQCxzXXO0VyKCM5TrvcATvhKQl7 xxKshbkvp6lMcQIu9WmT23otPMacMWQBDknUUVqi3CbI/gXuJYW2ReWBQiZR1cqqm27B Ha5A== 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=4N65tFuapHLjAUMgA1tcVlqBlDW93Xde72eM/RftHv8=; b=oLBFZtaqQ793sEu/qbyUTF2eOnYOmv/FXUk4JnubLdcr8DfAWn/olMLfShgsEIiw0v 4eZynXYgbOGQwFLya81x7w4TUDFMLs3jYm4O68MBU8CItbb4CatX807+sRU/SXODKPaw yVCgpnfuYg/JXe58Vm7MHo19FogivyqK8Q5P5puoPDodnEWNPZp6s25JOA0z1QowRAcH bMetlGbRFiPqQTmxVu1/fNqayYe4XoGHHVtSNt6iE60vIMzaV/LXA6TWZoOo1CsD/DsP L8oH/N0NjgMJzVgyfGX6nO4Y5sKrxgbWksFssjCuST4IDYoPKSJxkAwlrBcn0wOqTyr8 Z/Hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="A/8PaJ0R"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id 198-20020a6303cf000000b003f6229e2eabsi25251027pgd.843.2022.06.07.22.03.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 22:03:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="A/8PaJ0R"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9E3F045DB48; Tue, 7 Jun 2022 21:31:29 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1385431AbiFGW1P (ORCPT + 99 others); Tue, 7 Jun 2022 18:27:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1381266AbiFGVRb (ORCPT ); Tue, 7 Jun 2022 17:17:31 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 772712218AD; Tue, 7 Jun 2022 11:58:38 -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 34E5661768; Tue, 7 Jun 2022 18:58:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 42EDDC385A5; Tue, 7 Jun 2022 18:58:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654628316; bh=ctIJdYl0vlNt157giC31wNXX7wsg81SlduRBQ1uUmGs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A/8PaJ0RMZou8VjpCym0dMZ1wbP/ZsOWo5T+olzQ/xB8jhTu3jbzFfKXqMuNn3aLd 8VD5+qQd1PbOZtpcknG1fW2kBXCxyxp8GHM44wlBmb78pKQo4Pf2ztO07dRZTLCgKI sj/5/df+wlvZaVnM4JAoXi+0a7ZNyxLBo/Feacuw= 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 5.18 244/879] powerpc/xics: fix refcount leak in icp_opal_init() Date: Tue, 7 Jun 2022 18:56:02 +0200 Message-Id: <20220607165009.934535545@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@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=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 bda4c32582d9..4dae624b9f2f 100644 --- a/arch/powerpc/sysdev/xics/icp-opal.c +++ b/arch/powerpc/sysdev/xics/icp-opal.c @@ -196,6 +196,7 @@ int __init icp_opal_init(void) printk("XICS: Using OPAL ICP fallbacks\n"); + of_node_put(np); return 0; } -- 2.35.1