public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Hariprasad Kelam <hkelam@marvell.com>
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
Date: Tue, 10 Jan 2023 11:57:24 +0200	[thread overview]
Message-ID: <Y702hDZk3veZzt+b@unreal> (raw)
In-Reply-To: <20230109061325.21395-1-hkelam@marvell.com>

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 <hkelam@marvell.com>
> Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
> ---
>  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
> 

  reply	other threads:[~2023-01-10  9:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-09  6:13 [net PATCH] octeontx2-pf: Fix resource leakage in VF driver unbind Hariprasad Kelam
2023-01-10  9:57 ` Leon Romanovsky [this message]
2023-01-10 10:20 ` patchwork-bot+netdevbpf
2023-01-10 10:29   ` Leon Romanovsky
2023-01-10 10:43     ` Paolo Abeni
2023-01-10 11:11       ` Leon Romanovsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y702hDZk3veZzt+b@unreal \
    --to=leon@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gakula@marvell.com \
    --cc=hkelam@marvell.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sbhatta@marvell.com \
    --cc=sgoutham@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox