From: Leon Romanovsky <leon@kernel•org>
To: Shradha Gupta <shradhagupta@linux•microsoft.com>
Cc: linux-hardening@vger•kernel.org, netdev@vger•kernel.org,
linux-hyperv@vger•kernel.org, linux-kernel@vger•kernel.org,
linux-rdma@vger•kernel.org,
Colin Ian King <colin.i.king@gmail•com>,
Ahmed Zaki <ahmed.zaki@intel•com>,
Pavan Chebbi <pavan.chebbi@broadcom•com>,
Souradeep Chakrabarti <schakrabarti@linux•microsoft.com>,
Konstantin Taranov <kotaranov@microsoft•com>,
Kees Cook <keescook@chromium•org>,
Paolo Abeni <pabeni@redhat•com>, Jakub Kicinski <kuba@kernel•org>,
Eric Dumazet <edumazet@google•com>,
"David S. Miller" <davem@davemloft•net>,
Dexuan Cui <decui@microsoft•com>, Wei Liu <wei.liu@kernel•org>,
Haiyang Zhang <haiyangz@microsoft•com>,
"K. Y. Srinivasan" <kys@microsoft•com>,
Jason Gunthorpe <jgg@ziepe•ca>, Long Li <longli@microsoft•com>,
Shradha Gupta <shradhagupta@microsoft•com>
Subject: Re: [PATCH net-next v3] net: mana: Allow variable size indirection table
Date: Mon, 3 Jun 2024 11:41:22 +0300 [thread overview]
Message-ID: <20240603084122.GK3884@unreal> (raw)
In-Reply-To: <1717169861-15825-1-git-send-email-shradhagupta@linux.microsoft.com>
On Fri, May 31, 2024 at 08:37:41AM -0700, Shradha Gupta wrote:
> Allow variable size indirection table allocation in MANA instead
> of using a constant value MANA_INDIRECT_TABLE_SIZE.
> The size is now derived from the MANA_QUERY_VPORT_CONFIG and the
> indirection table is allocated dynamically.
>
> Signed-off-by: Shradha Gupta <shradhagupta@linux•microsoft.com>
> Reviewed-by: Dexuan Cui <decui@microsoft•com>
> Reviewed-by: Haiyang Zhang <haiyangz@microsoft•com>
> ---
> Changes in v3:
> * Fixed the memory leak(save_table) in mana_set_rxfh()
>
> Changes in v2:
> * Rebased to latest net-next tree
> * Rearranged cleanup code in mana_probe_port to avoid extra operations
> ---
> drivers/infiniband/hw/mana/qp.c | 10 +--
> drivers/net/ethernet/microsoft/mana/mana_en.c | 68 ++++++++++++++++---
> .../ethernet/microsoft/mana/mana_ethtool.c | 27 +++++---
> include/net/mana/gdma.h | 4 +-
> include/net/mana/mana.h | 9 +--
> 5 files changed, 89 insertions(+), 29 deletions(-)
<...>
> +free_indir:
> + apc->indir_table_sz = 0;
> + kfree(apc->indir_table);
> + apc->indir_table = NULL;
> + kfree(apc->rxobj_table);
> + apc->rxobj_table = NULL;
> reset_apc:
> kfree(apc->rxqs);
> apc->rxqs = NULL;
> @@ -2897,6 +2936,7 @@ void mana_remove(struct gdma_dev *gd, bool suspending)
> {
<...>
> @@ -2931,6 +2972,11 @@ void mana_remove(struct gdma_dev *gd, bool suspending)
> }
>
> unregister_netdevice(ndev);
> + apc->indir_table_sz = 0;
> + kfree(apc->indir_table);
> + apc->indir_table = NULL;
> + kfree(apc->rxobj_table);
> + apc->rxobj_table = NULL;
Why do you need to NULLify here? Will apc is going to be accessible
after call to mana_remove? or port probe failure?
Thanks
next prev parent reply other threads:[~2024-06-03 8:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-31 15:37 [PATCH net-next v3] net: mana: Allow variable size indirection table Shradha Gupta
2024-06-03 8:41 ` Leon Romanovsky [this message]
2024-06-04 5:36 ` Shradha Gupta
2024-06-04 8:32 ` Leon Romanovsky
2024-06-04 9:01 ` Shradha Gupta
2024-06-04 9:33 ` Simon Horman
2024-06-05 8:39 ` Shradha Gupta
2024-06-06 16:33 ` Simon Horman
2024-06-11 5:31 ` Shradha Gupta
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=20240603084122.GK3884@unreal \
--to=leon@kernel$(echo .)org \
--cc=ahmed.zaki@intel$(echo .)com \
--cc=colin.i.king@gmail$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=decui@microsoft$(echo .)com \
--cc=edumazet@google$(echo .)com \
--cc=haiyangz@microsoft$(echo .)com \
--cc=jgg@ziepe$(echo .)ca \
--cc=keescook@chromium$(echo .)org \
--cc=kotaranov@microsoft$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=kys@microsoft$(echo .)com \
--cc=linux-hardening@vger$(echo .)kernel.org \
--cc=linux-hyperv@vger$(echo .)kernel.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-rdma@vger$(echo .)kernel.org \
--cc=longli@microsoft$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
--cc=pavan.chebbi@broadcom$(echo .)com \
--cc=schakrabarti@linux$(echo .)microsoft.com \
--cc=shradhagupta@linux$(echo .)microsoft.com \
--cc=shradhagupta@microsoft$(echo .)com \
--cc=wei.liu@kernel$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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