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: <20240226070518.74898fe7@kernel.org>
Date: Mon, 26 Feb 2024 07:05:18 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: David Wei <dw@...idwei.uk>
Cc: Jiri Pirko <jiri@...nulli.us>, Sabrina Dubroca <sd@...asysnail.net>,
 maciek@...hnikowski.net, horms@...nel.org, netdev@...r.kernel.org, "David
 S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Paolo
 Abeni <pabeni@...hat.com>
Subject: Re: [PATCH net-next v13 1/4] netdevsim: allow two netdevsim ports
 to be connected

On Sat, 24 Feb 2024 09:33:02 -0800 David Wei wrote:
> >> +	err = 0;  
> > 
> > Why zero..   
> 
> Sorry left over from a previous iteration.
> 
> >   
> >> +	nsim_a = netdev_priv(dev_a);
> >> +	peer = rtnl_dereference(nsim_a->peer);
> >> +	if (peer) {
> >> +		pr_err("Netdevsim %d:%u is already linked\n", netnsfd_a, ifidx_a);
> >> +		goto out_err;  
> > 
> > I'd think if we hit this we should return -EBUSY?
> > Unless peer == dev_b, but that may be splitting hair.  
> 
> What would returning -EBUSY do?

This is continuation of the previous comment, you set err to zero,
so when device already has a peer user will get 0 (success)
They should get -EBUSY.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ