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: <20230823073743.61770fa4@kernel.org>
Date: Wed, 23 Aug 2023 07:37:43 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Ruan Jinjie <ruanjinjie@...wei.com>
Cc: <rafal@...ecki.pl>, <bcm-kernel-feedback-list@...adcom.com>,
 <davem@...emloft.net>, <edumazet@...gle.com>, <pabeni@...hat.com>,
 <opendmb@...il.com>, <florian.fainelli@...adcom.com>,
 <bryan.whitehead@...rochip.com>, <UNGLinuxDriver@...rochip.com>,
 <netdev@...r.kernel.org>, <andrew@...n.ch>
Subject: Re: [PATCH net-next v4 3/3] net: lan743x: Return PTR_ERR() for
 fixed_phy_register()

On Wed, 23 Aug 2023 15:43:58 +0800 Ruan Jinjie wrote:
> > EPROBE_DEFER is not a unix error code. We can't return it to user
> > space, so propagating it from ndo_open is not correct.  
> 
> When the error is EPROBE_DEFER, Whether print the netdev_err is ok? And
> what should it return?
> 
> How about this?
> 
> if (IS_ERR(phydev)) {
>      ......
>      if (PTR_ERR(phydev) != -EPROBE_DEFER)
>          return PTR_ERR(phydev);
>      else
>          return -EIO;
> }

That's too much code to copy & paste into every driver.

Someone who understands the code flow very well should tackle this.
Please leave the cases where fixed_phy_register() is called outside 
of probe alone.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ