Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2924055rwb; Mon, 15 Aug 2022 14:08:59 -0700 (PDT) X-Google-Smtp-Source: AA6agR65WM7AAXFxUvvzgfAmxazR5K5yDeUcqR8dtfNw46MywGflEfNBv4o7zcorgACmuEcnEpD4 X-Received: by 2002:a17:907:970b:b0:732:f76a:97a2 with SMTP id jg11-20020a170907970b00b00732f76a97a2mr11683102ejc.396.1660597739597; Mon, 15 Aug 2022 14:08:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660597739; cv=none; d=google.com; s=arc-20160816; b=kZsWBtLw7y7E+TerkrbKX2kuOuA0dlljjFSGtMDbYQ8oABPqo+L+QARStKdHzx16/C MB0pAbpZ7euM4SDF7AbC5brNDXXD7nd5UFdISmPj8QwBQlQzXVVAmsDLgs0eyMkeVI/V RUE+PxoAt/X9st1dx/3Uhp0ytv8dYPhmxFj8cZ84DKav3/VkQ+SMEtAEquSCRfl2G7+J B9FOQ/D37V7j9SiRQ889M663TARTczzgu3hT8tA42Bo9rUwoY+6kqqRd7EL10lbuL0gJ 7+59vmcg3YFyJixjHpPQ2W9z1QejSWe4ixl4tGb3H4ht2HMJOqo8jldQHgTEncnBEqx3 M52g== 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=MQ6IHOLCBSuRncBVzhltut/lJb5QkEY2RV9VNC/ycPU=; b=MkwJsCwxWBbGCLgGIGEdrFrcRhjwRAc/aydJ+n9Ao28XValEHm2FhP4xF/zHGhkbn+ VFKD1u/wewMsYM7q+XX0bP1YqAxL8qpIb+9W9S3DLH51Yiti1Raf0dc8WHjsyMl8y1Ff 9HYMEzvXclsPDUCUnLDgi68cHUBswIzKfM3XQbm3FjNAD16n2b+8fV7PZHRvV5YB8s0C uKIbfU+iubK6OwgWF9/yXkQOPJPfOTrJ4biZqZ5lYhvIpSMxCxfnSZY+1R0rptt/knsO DKawdpyrupP2rFCuBaEVApU3/GOQ3G8yd/j484UCwXYv+OUmNeB69MSKT5DSld2MAMfj X58w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="mw/gJYhU"; 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 cs9-20020a170906dc8900b0073157f7b820si8829661ejc.912.2022.08.15.14.08.34; Mon, 15 Aug 2022 14:08:59 -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="mw/gJYhU"; 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 S245663AbiHOThl (ORCPT + 99 others); Mon, 15 Aug 2022 15:37:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344609AbiHOTbi (ORCPT ); Mon, 15 Aug 2022 15:31:38 -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 324502F65F; Mon, 15 Aug 2022 11:44:47 -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 8C72D611E3; Mon, 15 Aug 2022 18:44:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 742E9C433C1; Mon, 15 Aug 2022 18:44:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660589085; bh=lFvRoPO0C78WmmkaQwm+/7W0uLsJV+9f16ZbqFOrQcw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mw/gJYhUeTni+DiHr+UZyukEDLbfz9zeQ0LMTBvc4LVFKLvCbuocAHaOA8WOLOaw1 uunynyHCeIYjHoxX5K0X7zHRd1IKcYIV2BtFOTD6v2NstMSS6cR5HjaKXZwkogquaz hh/yqESnCtrTFjFENsTPjhfBA+ecMdJxoV1ZrHlo= 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.15 609/779] rpmsg: qcom_smd: Fix refcount leak in qcom_smd_parse_edge Date: Mon, 15 Aug 2022 20:04:13 +0200 Message-Id: <20220815180403.396451137@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@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 370688e8646b..c1c07ff39a79 100644 --- a/drivers/rpmsg/qcom_smd.c +++ b/drivers/rpmsg/qcom_smd.c @@ -1380,6 +1380,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