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] [day] [month] [year] [list]
Message-ID:
 <SA3PR21MB38676E685565E2B144C1E1F3CAF5A@SA3PR21MB3867.namprd21.prod.outlook.com>
Date: Mon, 20 Oct 2025 14:58:26 +0000
From: Haiyang Zhang <haiyangz@...rosoft.com>
To: Jakub Kicinski <kuba@...nel.org>, Haiyang Zhang
	<haiyangz@...ux.microsoft.com>
CC: "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>, Paul Rosswurm
	<paulros@...rosoft.com>, Dexuan Cui <DECUI@...rosoft.com>, KY Srinivasan
	<kys@...rosoft.com>, "wei.liu@...nel.org" <wei.liu@...nel.org>,
	"edumazet@...gle.com" <edumazet@...gle.com>, "davem@...emloft.net"
	<davem@...emloft.net>, "pabeni@...hat.com" <pabeni@...hat.com>, Long Li
	<longli@...rosoft.com>, "ssengar@...ux.microsoft.com"
	<ssengar@...ux.microsoft.com>, "ernis@...ux.microsoft.com"
	<ernis@...ux.microsoft.com>, "dipayanroy@...ux.microsoft.com"
	<dipayanroy@...ux.microsoft.com>, Konstantin Taranov
	<kotaranov@...rosoft.com>, "horms@...nel.org" <horms@...nel.org>,
	"shradhagupta@...ux.microsoft.com" <shradhagupta@...ux.microsoft.com>,
	"leon@...nel.org" <leon@...nel.org>, "mlevitsk@...hat.com"
	<mlevitsk@...hat.com>, "yury.norov@...il.com" <yury.norov@...il.com>, Shiraz
 Saleem <shirazsaleem@...rosoft.com>, "andrew+netdev@...n.ch"
	<andrew+netdev@...n.ch>, "linux-rdma@...r.kernel.org"
	<linux-rdma@...r.kernel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>
Subject: RE: [EXTERNAL] Re: [PATCH net-next,v2] net: mana: Support HW link
 state events



> -----Original Message-----
> From: Jakub Kicinski <kuba@...nel.org>
> Sent: Friday, October 17, 2025 7:06 PM
> To: Haiyang Zhang <haiyangz@...ux.microsoft.com>
> Cc: linux-hyperv@...r.kernel.org; netdev@...r.kernel.org; Haiyang Zhang
> <haiyangz@...rosoft.com>; Paul Rosswurm <paulros@...rosoft.com>; Dexuan
> Cui <DECUI@...rosoft.com>; KY Srinivasan <kys@...rosoft.com>;
> wei.liu@...nel.org; edumazet@...gle.com; davem@...emloft.net;
> pabeni@...hat.com; Long Li <longli@...rosoft.com>;
> ssengar@...ux.microsoft.com; ernis@...ux.microsoft.com;
> dipayanroy@...ux.microsoft.com; Konstantin Taranov
> <kotaranov@...rosoft.com>; horms@...nel.org;
> shradhagupta@...ux.microsoft.com; leon@...nel.org; mlevitsk@...hat.com;
> yury.norov@...il.com; Shiraz Saleem <shirazsaleem@...rosoft.com>;
> andrew+netdev@...n.ch; linux-rdma@...r.kernel.org; linux-
> kernel@...r.kernel.org
> Subject: [EXTERNAL] Re: [PATCH net-next,v2] net: mana: Support HW link
> state events
> 
> On Tue, 14 Oct 2025 14:26:49 -0700 Haiyang Zhang wrote:
> > From: Haiyang Zhang <haiyangz@...rosoft.com>
> >
> > Handle the HW link state events received from HW channel, and
> > set the proper link state, also stop/wake queues accordingly.
> 
> Why do you have to stop / start the queues? I think it's unusual.
> Let the packets get dropped, sending out potentially old packets
> when link comes back is not going to make anyone happier.
Will do.

> 
> > +static void mana_link_state_handle(struct work_struct *w)
> > +{
> > +	struct mana_port_context *apc;
> > +	struct mana_context *ac;
> > +	struct net_device *ndev;
> > +	bool link_up;
> > +	int i;
> > +
> > +	ac = container_of(w, struct mana_context, link_change_work);
> > +
> > +	if (ac->mana_removing)
> > +		return;
> > +
> > +	rtnl_lock();
> > +
> 
> > @@ -3500,6 +3556,10 @@ void mana_remove(struct gdma_dev *gd, bool
> suspending)
> >  	int err;
> >  	int i;
> >
> > +	ac->mana_removing = true;
> > +
> > +	cancel_work_sync(&ac->link_change_work);
> 
> Looks racy, the work needs @ac to check the ->mana_removing but
> mana_remove() frees @ac. Just use disable_work_sync() please.

Good idea. Will update the patch.

Thanks,
- Haiyang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ