lkml.org 
[lkml]   [2023]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2023-08-16 22:26    [W:0.030 / U:0.624 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site