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: <20260204183144.5c5941ed@kernel.org>
Date: Wed, 4 Feb 2026 18:31:44 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Xuan Zhuo <xuanzhuo@...ux.alibaba.com>
Cc: lorenzo@...nel.org, andrew+netdev@...n.ch, pabeni@...hat.com,
 vadim.fedorenko@...ux.dev, davem@...emloft.net, guwen@...ux.alibaba.com,
 lulie@...ux.alibaba.com, hkallweit1@...il.com, edumazet@...gle.com,
 lukas.bulwahn@...hat.com, andrew@...n.ch, dong100@...se.com,
 dust.li@...ux.alibaba.com, netdev@...r.kernel.org
Subject: Re: [net-next,v25,4/6] eea: create/destroy rx,tx queues for
 netdevice open and stop

On Wed, 4 Feb 2026 19:46:12 +0800 Xuan Zhuo wrote:
> > I think AI is slightly confused here but so am I. I don't get where you
> > free he previous resources in this flow. The "bind_new_q_and_cfg" just
> > overrides stuff, who frees the old set of rings?  
> 
> 
> 	err = eea_alloc_rxtx_q_mem(ctx);
> 	if (err) {
> 		netdev_warn(enet->netdev,
> 			    "eea reset: alloc q failed. stop reset. err %d\n",
> 			    err);
> 		return err;
> 	}
> 
> 	eea_netdev_stop(enet->netdev); <---- here call eea_free_rxtx_q_mem

Ah, thanks for explaining.
FWIW when I write this sort of logic I use _stop() as "stop the HW"
hence the confusion. Should have read the code..

That said freeing the resources here will prevent you from going 
back to the old config. For instance the sysfs handling
(netif_set_real_num_queues()) could fail during increase.

Best way to implement this is to "swap" the resources between enet 
and ctx, so that you can go back.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ