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]
Date:   Wed, 16 Aug 2023 23:24:53 +0300
From:   Serge Semin <fancer.lancer@...il.com>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     Heiner Kallweit <hkallweit1@...il.com>,
        Russell King <linux@...linux.org.uk>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Francesco Dolcini <francesco.dolcini@...adex.com>,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC net] Revert "net: phy: Fix race condition on link status
 change"

On Wed, Aug 16, 2023 at 10:13:10PM +0200, Andrew Lunn wrote:
> > > So i suggest you change phy_process_error() to remove the lock.
> > 
> > This doable.
> > 
> > > Maybe
> > > add a test to ensure the lock is actually held, and do a phydev_err()
> > > if not.
> > 
> > This can't be done since phy_state_machine() calls phy_error_precise()
> > which calls phy_process_error() with no phy_device.lock held. Printing the
> > error in that case would mean an error in the Networking PHY subsystem
> > itself.
> > 
> > Do you suggest to take the lock before calling phy_error_precise() then?
> 
> Thanks for digging into the details.
> 
> phy_error_precise() is used in exactly one place. So i would actually
> put the lock inside it. And maybe move the comment about not using the
> function with the lock already held here :-)

Ok. I'll resubmit the patch tomorrow with the RFC status dropped.

-Serge(y)

> 
> 	 Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ