[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210817224008.pzdomrjaw5ewmpdg@skbuf>
Date: Wed, 18 Aug 2021 01:40:08 +0300
From: Vladimir Oltean <olteanv@...il.com>
To: Alvin Šipraga <ALSI@...g-olufsen.dk>
Cc: Vladimir Oltean <vladimir.oltean@....com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Jakub Kicinski <kuba@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Florian Fainelli <f.fainelli@...il.com>,
Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Frank Rowand <frowand.list@...il.com>,
Rob Herring <robh+dt@...nel.org>,
Saravana Kannan <saravanak@...gle.com>
Subject: Re: [PATCH net] net: dsa: sja1105: fix use-after-free after calling
of_find_compatible_node, or worse
On Wed, Aug 18, 2021 at 01:31:01AM +0300, Vladimir Oltean wrote:
> So it's a circular dependency? Switch cannot finish probing because it
> cannot connect to PHY, which cannot probe because switch has not
> finished probing, which....
The missing piece of the puzzle might be that MAC drivers can either
connect to the PHY at probe time, or at .ndo_open time. DSA chooses to
call phylink_of_phy_connect() inside dsa_port_phylink_register(), so at
probe time. Maybe this is a reason why it is a problem for some drivers
but not for others.
Powered by blists - more mailing lists