Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3094644rwb; Mon, 15 Aug 2022 18:00:10 -0700 (PDT) X-Google-Smtp-Source: AA6agR4gEJeoCYhkbm4D8LqEXVKPijkFEFa2FtExBe0CGc9BNZZuqvyJF78vAqyzTtI1i4lBDvTM X-Received: by 2002:a05:6402:156:b0:440:b458:93df with SMTP id s22-20020a056402015600b00440b45893dfmr17094034edu.337.1660611610528; Mon, 15 Aug 2022 18:00:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660611610; cv=none; d=google.com; s=arc-20160816; b=jCbQ6Q8DfJkE4JxoOhU2kYUy5nEmo1D+z7GqfEkf3nf+teY98uxFNEzquNuAFw/FmL B1X0yhZQiV+xod5YpjgC6HkStllPhM5jH2jZN4D8O/7XQhSYi9NYx1rtqxtwN8Jlo9aF 1hf2R875xjeQ/QyQqC0M27pF7HqbdTTRUzhK3KWkr6naRoEbjSR8fwiUhaN6ZSfgTW7d HhONx9jnPKQSd5Rb6eEFCt5fkF1D+crtVuOpFCqwIK7pfisebOZYcOKtC2fb4ydISWMQ EEP3+VhBMo0/lD7D+bwM8wwM7l6zFu4rlFYxAsJEevg6gPXfJbzoq2UqkaCPtW6RF9iI pCXA== 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=i5WEAXNe/eAJQgp2FwCnIrT785Jeq8j5hupIFschMKXn82ZDBf+0KoOyi8RdUPR6fv e1DvYL3YodRkevsHlg1lIawXPmZTlT9sogHGkynRODRzOPHudFiLbt5gNwGUzC7pPLyy Iry5FfvxWFpwZv0l+h+L4Cm7h7IKx8cJIafplw58G9w+1AwL9PdTZdswZtorHE8H9pUd 8C/Xlu71pGZ3kanZf9KjTUgR+m7JuAzgKocV8G5HtFKjuD4EAzWHdvS8fWdQwx6UXxt/ 3wJ3h6V73nROs7F6H2rGATuuuT0NiQYzBaJweA+hPvO2QwpyZBxtDw6bmC+h+V7+7Ra/ l0ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kxhKJCpT; 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 nd38-20020a17090762a600b0073159d67b74si9221975ejc.46.2022.08.15.17.59.39; Mon, 15 Aug 2022 18:00:10 -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=kxhKJCpT; 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 S244287AbiHPAty (ORCPT + 99 others); Mon, 15 Aug 2022 20:49:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347368AbiHPApz (ORCPT ); Mon, 15 Aug 2022 20:45:55 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FF61193547; Mon, 15 Aug 2022 13:41:08 -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 ams.source.kernel.org (Postfix) with ESMTPS id 36CA2B8113E; Mon, 15 Aug 2022 20:41:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 67B15C433C1; Mon, 15 Aug 2022 20:41:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660596065; bh=Da0gbbdZzQ1GHA0R171QoB/svWQr1XAmx/vQ/xxRN9A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kxhKJCpTggncLx7LcX7PWHonXAiLb7yB6bCK7Yks08Zc/whhJO0sTHangpnIcpf2y vfaWrwrQMgghW8idYNthA3VJt60M5cX6XnK8nW0sXLrIjI7++sUB7tmpW7SyUIbuGL W/VTNjjtn8/R5V5CTnktljxvaw2APECDcZu9hb9E= 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.19 0962/1157] rpmsg: qcom_smd: Fix refcount leak in qcom_smd_parse_edge Date: Mon, 15 Aug 2022 20:05:18 +0200 Message-Id: <20220815180518.131158560@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@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