Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp7548136rwl; Tue, 10 Jan 2023 02:11:39 -0800 (PST) X-Google-Smtp-Source: AMrXdXtG5JH5BQS1JWR88PiBpzNaxRGXuDT2RYW1PZpka9noASpN6AebPfJWWWd2tfA1ogyOhLnS X-Received: by 2002:a05:6a20:1029:b0:b5:e763:54f3 with SMTP id a41-20020a056a20102900b000b5e76354f3mr7961539pzd.35.1673345499180; Tue, 10 Jan 2023 02:11:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673345499; cv=none; d=google.com; s=arc-20160816; b=iAaAxLOE52ezccckE0e3EcB58Q/Kjw2jsRTwlFg4FHpRwNssuHwiIyU6vO/ZFmuS5R 0q8L7IXu/buHheno3MLLqGFs6PIGrNl2bzfvF3onKzaMSbv/hGJvpZNipUtmR4Qv9ZAq zCi78aD/FmFnK0eogU2upb1KY3gX+ncSdhrvjRuHYtig/6HZTm281eSEMuX4Qzeh2LvJ 4OeyxragLo87bQ9yRKHg3BtOF+LjQgiLGMvn0MsXroUP7fZ8fmcaOjhuKYaI0u2JQjwr bzFKbmlp5d1gbjsgujfB7KT1iHtw+ifbdBkGL/qcSOL+zKl8VS0HtfcsVFcGS2iZeJyV RbeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=GzZw8gFUSp38xLc0VQtzAfReGnkUN0i/Y2cZMF1RQlY=; b=XaGp8bfosIgQ+ONG5J5UjrR1RhrgcKARZkykgihyAoYwT8Q1S8218iC3CG8v4vRPYk 6UsxWJ5uSlcLpJVBhSEb3pqF52LjmAaTDaDxJ5CH7dGFYHv2A8088Gc238DXW3De4TV/ rcCvtm3FrcYfblyh3KOb44ydImmDMw6a1P9ZBInhi45R00mA2ylWYIz/6NniIvJHbB9Y z+1oxisCCl6BDsp4vt/0Y0AczpfJUBFnF3mubnsSMBi694oTEmfaVinRmKiBCkWfL7ZV K9PYEpeJCDv3GxSwnk500nynqyVORJjQFkA4wDk1HEEkE5m77dMth2/7TGhdpVT9Zfto ZE8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=alOcSdHo; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lr17-20020a17090b4b9100b00225ddc6a8bcsi15517368pjb.166.2023.01.10.02.11.32; Tue, 10 Jan 2023 02:11:39 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=alOcSdHo; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238055AbjAJJ5o (ORCPT + 53 others); Tue, 10 Jan 2023 04:57:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238264AbjAJJ5l (ORCPT ); Tue, 10 Jan 2023 04:57:41 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 009C74F13E; Tue, 10 Jan 2023 01:57:31 -0800 (PST) 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 B0B84B80FED; Tue, 10 Jan 2023 09:57:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0ACA6C433F0; Tue, 10 Jan 2023 09:57:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673344648; bh=LBzK5nBoEJR99O8wtGXtQYNy7sxo8GbARbZALPMRedE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=alOcSdHooOHjkSRa7MVR7vCKkWouHEMYcEZaVYgctLSo8NTAbtJOqY/ErgWZnKpAn /MLCea1OLBJAc/aGbS08IW8htZaeTJU7nFp08YoZXLtHQDJaK02Vt6WffpuMZ8sDDy mfek+6pBd15fe44oS9EBZh0Slkbjusw46D/g860Fx+YsJi+vB/4LzvjHeglGpC1H95 wc1Z3NPCBV2LsZuOoM+5YgEdfuZcY1vlmNF526CpzJ8WfrtYF7RWx48x5eoRHt0RmZ K2ogr8PAG5rGhg0090WBsHDoSphbo2gJD5TeVIt7dRUDwZ6WbV2vTG2j2odMt8+Mkd PiuVLzefFGhig== Date: Tue, 10 Jan 2023 11:57:24 +0200 From: Leon Romanovsky To: Hariprasad Kelam Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kuba@kernel.org, davem@davemloft.net, pabeni@redhat.com, edumazet@google.com, sgoutham@marvell.com, gakula@marvell.com, sbhatta@marvell.com Subject: Re: [net PATCH] octeontx2-pf: Fix resource leakage in VF driver unbind Message-ID: References: <20230109061325.21395-1-hkelam@marvell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230109061325.21395-1-hkelam@marvell.com> 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 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 On Mon, Jan 09, 2023 at 11:43:25AM +0530, Hariprasad Kelam wrote: > resources allocated like mcam entries to support the Ntuple feature > and hash tables for the tc feature are not getting freed in driver > unbind. This patch fixes the issue. It is not clear where in otx2vf_probe() these resource are allocated. Please add the stack trace to the commit message. Thanks > > Fixes: 2da489432747 ("octeontx2-pf: devlink params support to set mcam entry count") > Signed-off-by: Hariprasad Kelam > Signed-off-by: Sunil Kovvuri Goutham > --- > drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c > index 86653bb8e403..7f8ffbf79cf7 100644 > --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c > +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c > @@ -758,6 +758,8 @@ static void otx2vf_remove(struct pci_dev *pdev) > if (vf->otx2_wq) > destroy_workqueue(vf->otx2_wq); > otx2_ptp_destroy(vf); > + otx2_mcam_flow_del(vf); > + otx2_shutdown_tc(vf); > otx2vf_disable_mbox_intr(vf); > otx2_detach_resources(&vf->mbox); > if (test_bit(CN10K_LMTST, &vf->hw.cap_flag)) > -- > 2.17.1 >