Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3167362imw; Mon, 11 Jul 2022 03:22:15 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sqmfbVzjak20/vYVCVJN+gd/IdLmgjjZj9sI7PZ+0dJAS134IiqguR9ced4me2FE5b4nJO X-Received: by 2002:a17:907:7ea1:b0:72b:6d73:f588 with SMTP id qb33-20020a1709077ea100b0072b6d73f588mr535961ejc.373.1657534935312; Mon, 11 Jul 2022 03:22:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657534935; cv=none; d=google.com; s=arc-20160816; b=UjfZc3MmjeuhMP3OfIyS1Kw0O5GHkRgZXRTolifIMl+dA+bMgZwgLys3cnl4T/9oJ+ oQe9WzXNXX83/oN5X5zIg/oeA5HzzpyVDOAKThoViNkzEk+spumyZNSm8Ut7v1XcJVxd gSU4JLcj+kQRvBfH+S0QcsSAPTg5alGltIMA0kZb1LPeKCllcE2DWDKQH9gfQJV8KGgV YGG98bAAZ5DSdvwWSNOWU8nFGu3xzLWPBVynYjuhH5rxGFC+VQcdgU7ECqBNqX+ZwrRQ 1JwDbZarP3PumzsTuRcIhIcIZ2qwH71I+Izn1tjLqCfkEKQLpWLWXDn1nvBmz7nFZJ5y LMpA== 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=X54YdRhuzGvmTTjLPC1umPnuNKVHEVww4Mb8YSCBaBk=; b=UGACa8ZnSuYA5oYgehtkDpp3qGvyH3BIvy8qFLeOY81ceMz9wz1RiNqYBkWItMqZlc UtmEpZK5shcsZspcxC0dBK+HIaLwNwTaA/RMPpLigipywsJftZwTRzZa8wbmtKY4+LZJ ML3Z2aJEsoXE6PJ8h6jWTkWm6P6djudjClG3h1hwkXui7RQDRO6BNSzaj0vVZKOmNK2e KKcNV3epAmLwEZfQS0y+bEgS0iQj3/Cwx09/3ya0vIf9oAVpuJtfJWM7okmuzKQSuWDS Os8KUQJfHVSpUnKl771eBh2HO2bubnQXtxf7d6XDVsNu8AfmKKzstDUq93qKYL+oDW4U 05CQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=EBYHF3ET; 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 dm28-20020a05640222dc00b0043a5f039490si9203823edb.632.2022.07.11.03.21.48; Mon, 11 Jul 2022 03:22:15 -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=EBYHF3ET; 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 S231394AbiGKJNE (ORCPT + 99 others); Mon, 11 Jul 2022 05:13:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58854 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230053AbiGKJMd (ORCPT ); Mon, 11 Jul 2022 05:12:33 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F1242B625; Mon, 11 Jul 2022 02:09:25 -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 5D55161148; Mon, 11 Jul 2022 09:09:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 66FE8C34115; Mon, 11 Jul 2022 09:09:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1657530563; bh=qCn3vJHS/C7fNnwqsIhkYVnnxDJN/QGKOxb8OfBNZ68=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EBYHF3ETCCAqN9awRcgAavVW/wYec+fn4eex8lyP5DCvmWmULU+9uxhJsC4AJNaCG JmQWENN1hIDuFgGak7O/pheQPivjPMKftORSF7yme3ZUlytNz70oabyHeYa3chjRFn OROA1m0kQzFH6gJPRxMn+TPc1pM8dd5auKV8qEC0= 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.19 30/31] dmaengine: ti: Fix refcount leak in ti_dra7_xbar_route_allocate Date: Mon, 11 Jul 2022 11:07:09 +0200 Message-Id: <20220711090538.735930649@linuxfoundation.org> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220711090537.841305347@linuxfoundation.org> References: <20220711090537.841305347@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);