Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1860175rwb; Fri, 19 Aug 2022 10:34:56 -0700 (PDT) X-Google-Smtp-Source: AA6agR7MnvS2WbmP+MbbtAiEbcmJILw39qjt36Y3DVTBzWjU40GAhaTL46mKjzJa1/SAQhgliSfm X-Received: by 2002:a05:6a00:c91:b0:52f:1b60:b526 with SMTP id a17-20020a056a000c9100b0052f1b60b526mr8938412pfv.74.1660930495727; Fri, 19 Aug 2022 10:34:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660930495; cv=none; d=google.com; s=arc-20160816; b=TMujlwpkV1ZQCOrTyrUZ3rYyx8YoXH83ii1Y2QC2pCtjNsmX6oD6vRst5D0RWvPZ/E VN2HT7USExWLangIkJCSjiVSGRYErYVkhi+vdj4qaNWXFHjorzQ5xbkNJ8C/Nw2o9oP1 yO6NqDRb//dAXduDlSlBPCbrwq0CS0z6HV1YIEEEa6Fht03Q0BM+jtRW5CtuiphygVOC q+4pG8M4TpLkPWP1k0E5mbQP3gASr/RIE/E93zNrh2s9PxZmYPdPCCZTb0KkWtEaaHWB iKNiDB+DBuICEMvscjxBD6NJSdulYxXej89LHXuG0SN2TJNU+ZGYkCI7QRnp1oMwrDt0 dGQA== 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=A8Vv55HtNn9o/myBMyCCX+dtyEkfpbwaufJzTyMI0hg=; b=VJOW5FOnGaTfZt2HXS6JXXSTbNB2Wi6sfMFWDIHf8uZts+oqbkXIB9q7dZMN2bBE/P lYXH/0S210KkJQvke5PtccM+hDg1JyWZc6lbnsoZTwACwy7bPf18F1KqN+uB0i/c+XpR OJe8PUdVA8zGjghTKhQfNxq+qirEq0X7HVkAxdfxBx74ONDNJWw+WWfJGfacj9rUBP1J 7/B4mpXdrDrrtsI9xrn5ky4OM1srmixkuqMYe5lDVReUVTNYtkJxrJ9RwPmW1A1rMnUn 7HL8uD19UUaI24XwB36dv0wViVkmPlx5Laqd0N0NTSeVKruDo3pIOaIrdqHTgWb+/MiG Opnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="cFos/ZAq"; 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 x9-20020aa784c9000000b0052daa005a8asi4418024pfn.374.2022.08.19.10.34.45; Fri, 19 Aug 2022 10:34:55 -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="cFos/ZAq"; 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 S1353293AbiHSQew (ORCPT + 99 others); Fri, 19 Aug 2022 12:34:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353429AbiHSQbk (ORCPT ); Fri, 19 Aug 2022 12:31:40 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11B6E11E90E; Fri, 19 Aug 2022 09:05:51 -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 E4AC7617A5; Fri, 19 Aug 2022 16:05:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DD9AEC433D7; Fri, 19 Aug 2022 16:05:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660925146; bh=Md5RQ6iHQPX4e7LRHADrQoCMdtevRuFoWjv4ghAxn0k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cFos/ZAqZ9oyVtpHQ1iukmNz/8AXB6yXE88LHwa27DTq+NRBKZL2rTsguUj5hXo2f CE87zYcjcf1BOSzUtsaXMcv1WfE9rNuF302RpgUsMe+xuc4CC5UWV4EsWUpDV6kQ02 7kJKwl8NS9c4jV3Z/UjOqcUYsiu2UM9Wxn3Vw298= 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.10 398/545] rpmsg: qcom_smd: Fix refcount leak in qcom_smd_parse_edge Date: Fri, 19 Aug 2022 17:42:48 +0200 Message-Id: <20220819153847.231724894@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220819153829.135562864@linuxfoundation.org> References: <20220819153829.135562864@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 a4db9f6100d2..0b1e853d8c91 100644 --- a/drivers/rpmsg/qcom_smd.c +++ b/drivers/rpmsg/qcom_smd.c @@ -1364,6 +1364,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