Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3174971imw; Mon, 11 Jul 2022 03:34:09 -0700 (PDT) X-Google-Smtp-Source: AGRyM1taS2PhIkvga994DbFVX+l9TwV+XihH9mZAmkcEP7ht8iQD+vbHV+gQusfUrUatuPOcQ/30 X-Received: by 2002:a17:907:9686:b0:71b:6f0a:c724 with SMTP id hd6-20020a170907968600b0071b6f0ac724mr17378420ejc.138.1657535649698; Mon, 11 Jul 2022 03:34:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657535649; cv=none; d=google.com; s=arc-20160816; b=Th8b2RdJMRISmwaMxcM03nResEG+QX3Lqvdb2M9s+RxWVP7UpVRYbDvpE47Ii/KK68 sGEPMiElhW2avvMfWaHrqqgkTkDvMC9GEn6XxeYxTzQFMR3xq8eGn/32AJqOcJO6SAh4 8lWVqNPa4BcCQpKSH2aC/zgIEMs8txMhDuzdYHaLgiz+lMEsQRE4Vkvj/fURz4/sPcqa /65yyEmZYQgoxMaSmwqshN+LxNrsNVoI7pu3E5Xm8YsxFrxGVAcShz6tYet8SOZ1aCag P01+99FN8R+x2gAE/vEn/O0dMemzWI+Mxg0MUzQ/L49JxLacVl0NSumZaiSgvvJ2b3lw Av3w== 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=XfgwkA/gg5W7x8uEm3IEE3rmRuy3eB6XDoAK90+hwhKmKL4OmLhRbwwjCtCk+5CsdJ I7qPLA2ygPt6TB1KYnOz6cxUGayqVv5vKhhCoDexlWEwG8xEpUa+S9tFeRUdNcy8od7e 0WjXPMbRG1woQe5gIFGL0tKtCp4PxmzgfKZoMcozXzseqiQmnsAtT19wQv9Pe0DTeELv DYNiNUbluZRq/zO03Dkn6Z13cjLxl1KyYonGFnKrXOXDmsP18hNzMnlq6iaAVsg/HyDv iEBS3VyZ3y/ZW9V/3171Og7J20ESIT+vjUKwhFvDNBFvMDnmC0pJB/UzVBNqB4E2gw4k a7Rw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="NYA+MoA/"; 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 e22-20020a17090658d600b0072a6779a9afsi11467450ejs.249.2022.07.11.03.33.44; Mon, 11 Jul 2022 03:34:09 -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="NYA+MoA/"; 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 S230178AbiGKJY6 (ORCPT + 99 others); Mon, 11 Jul 2022 05:24:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232108AbiGKJXg (ORCPT ); Mon, 11 Jul 2022 05:23:36 -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 09E7D31209; Mon, 11 Jul 2022 02:13:56 -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 8359FB80DB7; Mon, 11 Jul 2022 09:13:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AF0B7C34115; Mon, 11 Jul 2022 09:13:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1657530834; bh=Hk/f5HEXN2CGqKGi2hWX/5xqot39iQo6TVSPqo3c+18=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NYA+MoA/pW6ePyECjqyee8+S/eRl3GehEQrjB4Smd6Eqt4kCRLWIeo+sZMsTmXnRz 4NcMOpl4gI2/2mHlAgqpgKbLEVrofDGhMnW6cn7Wy6RNWUCfKrGyJAuFw5MVAf75yg HO15VPn/1Mz8yamEaNj8LRpKjPTeOMrFr9awlzO0= 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.10 54/55] dmaengine: ti: Fix refcount leak in ti_dra7_xbar_route_allocate Date: Mon, 11 Jul 2022 11:07:42 +0200 Message-Id: <20220711090543.343274588@linuxfoundation.org> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220711090541.764895984@linuxfoundation.org> References: <20220711090541.764895984@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);