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: <077a532cb112d296b6cfb7692ed25bf9dd64f199@linux.dev>
Date: Wed, 19 Jun 2024 01:55:00 +0000
From: "Yajun Deng" <yajun.deng@...ux.dev>
To: "Jakub Kicinski" <kuba@...nel.org>
Cc: davem@...emloft.net, edumazet@...gle.com, pabeni@...hat.com,
 netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next] net: core: Remove the dup_errno parameter in
 dev_prep_valid_name()

June 18, 2024 at 10:48 PM, "Jakub Kicinski" <kuba@...nel.org> wrote:



> 
> On Tue, 18 Jun 2024 21:17:43 +0800 Yajun Deng wrote:
> 
> > 
> > netdev_name_in_use() return -EEXIST makes more sense if it's not NULL.
> > 
> 
> netdev_name_in_use() returns bool.
> 

I should say the netdev_name_in_use() in dev_prep_valid_name() return -EEXIST. 

> > 
> > But dev_alloc_name() should keep the -ENFILE errno.
> > 
> 
> And it does.
> 
> I don't understand what problem you're trying to fix.
> 
> The code is fine as is.
>

This is not a fix. 

There are three callers to dev_prep_valid_name(), only dev_alloc_name() needs
to replace -EEXIST with -ENFILE. We shouldn't add an extra parameter for this,
because it's not necessary for the other callers.

If we do it in dev_alloc_name(), the other callers can save a parameter.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ