lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2f77825b-c6db-491a-867d-1d7d357ea2a3@linux.alibaba.com>
Date: Mon, 17 Jun 2024 23:28:14 +0800
From: Heng Qi <hengqi@...ux.alibaba.com>
To: Shradha Gupta <shradhagupta@...ux.microsoft.com>
Cc: Souradeep Chakrabarti <schakrabarti@...ux.microsoft.com>,
 Erick Archer <erick.archer@...look.com>,
 Konstantin Taranov <kotaranov@...rosoft.com>, Simon Horman
 <horms@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
 Jakub Kicinski <kuba@...nel.org>, Eric Dumazet <edumazet@...gle.com>,
 "David S. Miller" <davem@...emloft.net>, Dexuan Cui <decui@...rosoft.com>,
 Wei Liu <wei.liu@...nel.org>, Haiyang Zhang <haiyangz@...rosoft.com>,
 "K. Y. Srinivasan" <kys@...rosoft.com>,
 Shradha Gupta <shradhagupta@...rosoft.com>,
 open list <linux-kernel@...r.kernel.org>,
 "open list:NETWORKING DRIVERS" <netdev@...r.kernel.org>,
 linux-hyperv@...r.kernel.org
Subject: Re: [PATCH net-next] net: mana: Use mana_cleanup_port_context() for
 rxq cleanup


在 2024/6/14 下午3:19, Shradha Gupta 写道:
> To cleanup rxqs in port context structures, instead of duplicating the
> code, use existing function mana_cleanup_port_context() which does
> the exact cleanup that's needed.
>
> Signed-off-by: Shradha Gupta <shradhagupta@...ux.microsoft.com>
> ---
>   drivers/net/ethernet/microsoft/mana/mana_en.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c b/drivers/net/ethernet/microsoft/mana/mana_en.c
> index b89ad4afd66e..93e526e5dd16 100644
> --- a/drivers/net/ethernet/microsoft/mana/mana_en.c
> +++ b/drivers/net/ethernet/microsoft/mana/mana_en.c
> @@ -2529,8 +2529,7 @@ static int mana_init_port(struct net_device *ndev)
>   	return 0;
>   
>   reset_apc:
> -	kfree(apc->rxqs);
> -	apc->rxqs = NULL;
> +	mana_cleanup_port_context(apc);
>   	return err;
>   }
>   
> @@ -2787,8 +2786,7 @@ static int mana_probe_port(struct mana_context *ac, int port_idx,
>   free_indir:
>   	mana_cleanup_indir_table(apc);
>   reset_apc:
> -	kfree(apc->rxqs);
> -	apc->rxqs = NULL;
> +	mana_cleanup_port_context(apc);
>   free_net:
>   	*ndev_storage = NULL;
>   	netdev_err(ndev, "Failed to probe vPort %d: %d\n", port_idx, err);

Reviewed-by: Heng Qi <hengqi@...ux.alibaba.com>

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ