Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3179111imw; Mon, 11 Jul 2022 03:40:17 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u8qk6v8PkHvm+LSjEcfo35MOtOsZIZLqS08ESaxaA0V7wgkLqma6m7xVH+w9jg9eyWPlsD X-Received: by 2002:aa7:d30b:0:b0:43a:4bea:75c6 with SMTP id p11-20020aa7d30b000000b0043a4bea75c6mr23678059edq.12.1657536016816; Mon, 11 Jul 2022 03:40:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657536016; cv=none; d=google.com; s=arc-20160816; b=TmMlY1pBurvO9fIy52d91K1xpTuZGLty0vI0e2XHLWdk8Z8AqkRwQ8wJb7jpnCXbW5 CXF5wOnUVfYFmbSWcPP9nAepMYtFQfvn4xTTRG+Y0rUxz+tOAtVH30I2ixX0WtQ1+HKB zz0XP8b+3pFGUQPyEnIuri/T4LCOXMCjxmgL1BAkUz1Psr2I2E6cVcQc82VIkpAUBevY oCGD3C44iJ5Zz8HfuEgeA5jd6v3PpaiQkkcX5bfqiHe4kyrAiG5UGthqEnoekNCqZqh+ LRadb4tmac5VC4+ETy9Ot8/Q5GQY0EMOw8b7VeMDUbcusD3pHt/hSz0a5r8PvNxnYLjj HvVQ== 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=Yp/f5HLRt9lUgMmq8Cg6lhqpaEeczPgcF6wJJUn8kvQ=; b=UlQ+lKtmknLYdNdixQT+4V19Jmb1E8iM1beLXiQIqblzXNIdCrNcoBEIbXkNYL5OST YGu8sTwbPYf/iY+uurQ64BxkMDWx3MVG1v/p9VIvAQbiDSMJttIN1k6lIxa7DHb7s8z+ 8WHP/rh50HcJqzFvgDtW6EytJtOBGzrpnDX47bIypkgWOp/Lcrn2wLwQOefu4dR5/TWE nuGbilmNcSv0vOP61CcJq2W+MSCWm2/FxGYe+EsHOtrGWqXXxduol5v3ebfdOB92K4LF Lwp5753ty81vd/gpnYwLmyctuWhadZjPktMBY73r6+VA9+hl5wBo3Ky06wCGWMnmV6YM IWcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=aaaZU+T6; 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 sc31-20020a1709078a1f00b0072b4567e761si7871347ejc.201.2022.07.11.03.39.51; Mon, 11 Jul 2022 03:40:16 -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=aaaZU+T6; 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 S231765AbiGKKFu (ORCPT + 99 others); Mon, 11 Jul 2022 06:05:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234665AbiGKKEV (ORCPT ); Mon, 11 Jul 2022 06:04:21 -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 4CC5387F64; Mon, 11 Jul 2022 02:30:06 -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 89BE2B80E8B; Mon, 11 Jul 2022 09:30:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F3E20C34115; Mon, 11 Jul 2022 09:30:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1657531803; bh=Hk/f5HEXN2CGqKGi2hWX/5xqot39iQo6TVSPqo3c+18=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aaaZU+T6N2xn6uaYNS9ObW2lvXhRE8TsVmiUdVzG2N1pvAzUE1Opnj+mpSgfxfpAQ 8BUQhiSmzW957QSw41tfgH51W/MiiG5rJQwG9Tg9RGxU4ZGQ7QNel8bO2npQbemQxD k6yAaYgHK5FR5/BZJJFAdSJoVghjAK3H1SFrf0oQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miaoqian Lin , Vinod Koul Subject: [PATCH 5.15 226/230] dmaengine: ti: Fix refcount leak in ti_dra7_xbar_route_allocate Date: Mon, 11 Jul 2022 11:08:02 +0200 Message-Id: <20220711090610.512450424@linuxfoundation.org> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220711090604.055883544@linuxfoundation.org> References: <20220711090604.055883544@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=-7.7 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 commit c132fe78ad7b4ce8b5d49a501a15c29d08eeb23a upstream. of_parse_phandle() returns a node pointer with refcount incremented, we should use of_node_put() on it when not needed anymore. Add missing of_node_put() in to fix this. Fixes: ec9bfa1e1a79 ("dmaengine: ti-dma-crossbar: dra7: Use bitops instead of idr") Signed-off-by: Miaoqian Lin Link: https://lore.kernel.org/r/20220605042723.17668-2-linmq006@gmail.com Signed-off-by: Vinod Koul Signed-off-by: Greg Kroah-Hartman --- drivers/dma/ti/dma-crossbar.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/dma/ti/dma-crossbar.c +++ b/drivers/dma/ti/dma-crossbar.c @@ -268,6 +268,7 @@ static void *ti_dra7_xbar_route_allocate mutex_unlock(&xbar->mutex); dev_err(&pdev->dev, "Run out of free DMA requests\n"); kfree(map); + of_node_put(dma_spec->np); return ERR_PTR(-ENOMEM); } set_bit(map->xbar_out, xbar->dma_inuse);