Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3166514imw; Mon, 11 Jul 2022 03:21:03 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ub3Rp8H/UZBwGLtGMDKlLaC2vcIScqkXx9zV49oVmK4OxjimcTmyb4W36of7uujKSTiwCj X-Received: by 2002:a05:6402:4446:b0:43a:3f52:4172 with SMTP id o6-20020a056402444600b0043a3f524172mr23020280edb.417.1657534863387; Mon, 11 Jul 2022 03:21:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657534863; cv=none; d=google.com; s=arc-20160816; b=Kj2ZS4HPDAbKaFKy6TtEP2HtH9pE/9SIfS8lEkWFkYR5raqtm5sAghIw5sxg2S2iVi Bp9yh4MgCmOOx4cRX51qPbhk4MfzAIoRq5QSy2vCtcrmF/azNunm57+9O1MrSqD+pSc9 d++F6nD4Q3r/tI+1GtgUbc0iIyK1kIvNC+qtJe+Ibff+PWDLlcttN8tFFR5azrzS/wPq OCkIjOkB6yhGzFNMA6dZYP98vMBH4uuLdHxBvMkD4ZwiLQzccewzMgvmIj/sHqgvmJA4 Rs03c5B8yK4WRyrzd4mH2fJUl8Nz8j5bd+qP/peAtJNPTRNqztwzzxTKptvR0ruT9a47 QxkA== 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=3ffcGXyAj9jH5WHls5TSpm5oIfheODg4UgLo6Gsdl70=; b=O3M5MwL+ouKC8Fti6jQSbLeW7MRWWi+TLcQVN8FETMUQ3fbIxnH8ii5BmaGqkb43F7 hzduq/I9lmittUyAfzJauOb/BfIoT+z5HUjjfzjTYdCH2Wlb1EH6qF2duSqbzPJ8uhRd orblUS/oB9irZ6A5t+WdYIcgserXvNz/dYwtoQdyzJ6BKJGZyUOfwSUSSw+4rFYkMIC/ QFmvVSYfoipwRNISIAfzfkHnEyYCM5ytU8DoN1rYy6hiI6Vq4k6sDpEOR5EjJTdZlM3S njauGMy0e5/05jVXqPla2Nkn64Q6Gx2BpOpNWujPHYYj0+YECbh2CpgCAuEd7DjgMXiX 5icQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=clJTqzAU; 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 qk41-20020a1709077fa900b0072abb81b5eesi8967671ejc.616.2022.07.11.03.20.39; Mon, 11 Jul 2022 03:21:03 -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=clJTqzAU; 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 S229810AbiGKJJS (ORCPT + 99 others); Mon, 11 Jul 2022 05:09:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230056AbiGKJIq (ORCPT ); Mon, 11 Jul 2022 05:08:46 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A61E4275C0; Mon, 11 Jul 2022 02:07:52 -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 BD4BF6118F; Mon, 11 Jul 2022 09:07:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C612CC341CD; Mon, 11 Jul 2022 09:07:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1657530471; bh=CJBE30fgZXe3monlOPi4HZcMFV3BbSj4yu2McIeje50=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=clJTqzAUaBixZgu1sUEE8eXG+1d+cekYuk43qjFLmrxYESosYE7ZeZ0RFb43MfGIJ wcTKN9cgaW3CsM8Lv9uVUhkIrLeu3/aYpyj1iTlIP9qW5ws6strNgtjlyZ/mDmFUhB QPvtpV/6xMAhlnbUTjA9cfXs2dgMlS1DlsONNAy4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miaoqian Lin , Vinod Koul Subject: [PATCH 4.14 16/17] dmaengine: ti: Fix refcount leak in ti_dra7_xbar_route_allocate Date: Mon, 11 Jul 2022 11:06:41 +0200 Message-Id: <20220711090536.747481497@linuxfoundation.org> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220711090536.245939953@linuxfoundation.org> References: <20220711090536.245939953@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 @@ -274,6 +274,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);