linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: sundeep subbaraya <sundeep.lkml@gmail.com>
To: Manank Patel <pmanank200502@gmail.com>
Cc: sgoutham@marvell.com, gakula@marvell.com, sbhatta@marvell.com,
	hkelam@marvell.com, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ethernet: marvell: octeontx2 Fix resource not freed after malloc
Date: Tue, 18 Oct 2022 09:24:15 +0530	[thread overview]
Message-ID: <CALHRZupuBVAhd=fK+4E=keBTnt=GEGrWOTpN0-xBfu2Yj1+PDA@mail.gmail.com> (raw)
In-Reply-To: <20221017191743.75177-1-pmanank200502@gmail.com>

Hi,

On Tue, Oct 18, 2022 at 1:27 AM Manank Patel <pmanank200502@gmail.com> wrote:
>
> fix rxsc not getting freed before going out of scope
>
> Fixes: c54ffc73601c ("octeontx2-pf: mcs: Introduce MACSEC hardware offloading")
>
> Signed-off-by: Manank Patel <pmanank200502@gmail.com>
> ---
>  drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c b/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c
> index 9809f551fc2e..c7b2ebb2c75b 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c
> @@ -870,6 +870,7 @@ static struct cn10k_mcs_rxsc *cn10k_mcs_create_rxsc(struct otx2_nic *pfvf)
>         cn10k_mcs_free_rsrc(pfvf, MCS_RX, MCS_RSRC_TYPE_FLOWID,
>                             rxsc->hw_flow_id, false);
>  fail:
> +       kfree(rxsc);

Thanks for the fix. Can you do the same in cn10k_mcs_create_txsc as well.

Sundeep

>         return ERR_PTR(ret);
>  }
>
> --
> 2.38.0
>

  reply	other threads:[~2022-10-18  3:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-17 19:17 [PATCH] ethernet: marvell: octeontx2 Fix resource not freed after malloc Manank Patel
2022-10-18  3:54 ` sundeep subbaraya [this message]
2022-10-18  5:33   ` [PATCH v2] " Manank Patel
2022-10-19 12:50     ` patchwork-bot+netdevbpf

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='CALHRZupuBVAhd=fK+4E=keBTnt=GEGrWOTpN0-xBfu2Yj1+PDA@mail.gmail.com' \
    --to=sundeep.lkml@gmail.com \
    --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=pmanank200502@gmail.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;
as well as URLs for NNTP newsgroup(s).