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: <20231020120149.3a569db7@kernel.org>
Date: Fri, 20 Oct 2023 12:01:49 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Jiri Pirko <jiri@...nulli.us>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
 pabeni@...hat.com, johannes.berg@...el.com, mpe@...erman.id.au, j@...fi
Subject: Re: [PATCH net-next 2/6] net: make dev_alloc_name() call
 dev_prep_valid_name()

On Fri, 20 Oct 2023 12:24:57 +0200 Jiri Pirko wrote:
> > static int dev_get_valid_name(struct net *net, struct net_device *dev,
> > 			      const char *name)
> > {
> >-	return dev_prep_valid_name(net, dev, name, dev->name);
> >+	int ret;
> >+
> >+	ret = dev_prep_valid_name(net, dev, name, dev->name, EEXIST);
> >+	return ret < 0 ? ret : 0;  
> 
> Why can't you just return dev_prep_valid_name() ?
> 
> No caller seems to care about ret > 0

AFACT dev_change_name() has some weird code that ends up return 
the value all the way to the ioctl and user space. Note that it
has both err and ret variables :S

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ