Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3014789rwb; Mon, 15 Aug 2022 16:10:50 -0700 (PDT) X-Google-Smtp-Source: AA6agR4B3IlF8oYIuI83h3g3Gw4fUoSPsMyRm0w4W2DBDShQu1s/9e0Mw8Rid5UIRtuZtSanOJAG X-Received: by 2002:a17:906:c150:b0:733:76b:c7a5 with SMTP id dp16-20020a170906c15000b00733076bc7a5mr11338408ejc.567.1660605050637; Mon, 15 Aug 2022 16:10:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605050; cv=none; d=google.com; s=arc-20160816; b=jL9768XFwzXRHsiDbn8csHdM6ps/5DkNubUU4zYA7Aqps7pKfQAJOfvrLBvRcrT8a7 lx/rfsAHlP80OzdP/1tUPfmb/AWQUttyy9oerS1bHq16/xTnoqxOedZ7zDa6sRRVzUzg qc4FewUABfJVj9wKaulfjp8NhUW7i6JqCnM8Zn3eXkuMAthPDjNzFC5ywUMyBxQc6ZGa lOVrYOjyaijCYY+0DypG5Z6n5RWIte/PQLmJzbhUmcxg82mSkFgvHFNl/9UajvFNonie 4SmokOAn9XT2AH9PYmXZNAdl9M+fnZi0/chVnppg4HATkjs39bf3YSTZuVIdnLJsKu5z ss3w== 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=rZ4rhyAsGMuvLp+5AZxO20N51hbccIaveGWOPNBq/jc=; b=AoUnKIcLBRk2qJVeyKwG8ZzMUk5QTMDc2qyWc/VTr2jtu1S+bz/+ukwhxCA5wmWLhN 10MjOVC+VPNMd9GgYJmWgiH2nkjGDXgDk8xgrkre8T8tWo+HKWwycO7dp/m8YzDGidny UBm3lzUBEK9GOVhYgo5EA5dlV8BhhHz53hh7jcTjoAAjTJTJT75YHfMDXjL0JFbDAUiG +4nOEVjSff0TBRWIKaecwIchD3cz+KncKq4o53BNLaMiqq9hR/5jw9piJz1szn7iaoM/ huTtzaSn6YTxAJ0kP4U8YUM6E2eXVmeNA/jXl6iuMkvtKYuWg0sNqAcsxAMtSSTVqZbO /wzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ABT+zv6H; 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 du8-20020a17090772c800b00733ca35c0a6si9339178ejc.626.2022.08.15.16.10.24; Mon, 15 Aug 2022 16:10:50 -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=ABT+zv6H; 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 S1351382AbiHOWno (ORCPT + 99 others); Mon, 15 Aug 2022 18:43:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351364AbiHOWiD (ORCPT ); Mon, 15 Aug 2022 18:38:03 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C20D013263E; Mon, 15 Aug 2022 12:51:07 -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 3DBFD6122B; Mon, 15 Aug 2022 19:51:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 468DCC433D6; Mon, 15 Aug 2022 19:51:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660593065; bh=Da0gbbdZzQ1GHA0R171QoB/svWQr1XAmx/vQ/xxRN9A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ABT+zv6HQKN2PWzFlc4pmNYzZ//+UPTM8SA4sHgXPis7LyPQNPuhNW5EBNTF2tWiv CEGEzb2vejhF8OHiAmF24xVGVB65OMCVK3WMMnwQrIa+8V9X79ip/i4asAZ+u4bFiv nu/X9ypaf/Mz95eW5ggw+WykCa4rABDhCADMke2I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miaoqian Lin , Bjorn Andersson , Sasha Levin Subject: [PATCH 5.18 0887/1095] rpmsg: qcom_smd: Fix refcount leak in qcom_smd_parse_edge Date: Mon, 15 Aug 2022 20:04:46 +0200 Message-Id: <20220815180506.030325207@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@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: Miaoqian Lin [ Upstream commit 65382585f067d4256ba087934f30f85c9b6984de ] of_parse_phandle() returns a node pointer with refcount incremented, we should use of_node_put() on it when done. Fixes: 53e2822e56c7 ("rpmsg: Introduce Qualcomm SMD backend") Signed-off-by: Miaoqian Lin Signed-off-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220511120737.57374-1-linmq006@gmail.com Signed-off-by: Sasha Levin --- drivers/rpmsg/qcom_smd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/rpmsg/qcom_smd.c b/drivers/rpmsg/qcom_smd.c index 1957b27c4cf3..f7af53891ef9 100644 --- a/drivers/rpmsg/qcom_smd.c +++ b/drivers/rpmsg/qcom_smd.c @@ -1383,6 +1383,7 @@ static int qcom_smd_parse_edge(struct device *dev, } edge->ipc_regmap = syscon_node_to_regmap(syscon_np); + of_node_put(syscon_np); if (IS_ERR(edge->ipc_regmap)) { ret = PTR_ERR(edge->ipc_regmap); goto put_node; -- 2.35.1