From: Saravana Kannan <saravanak@google.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: "Alvin Šipraga" <ALSI@bang-olufsen.dk>,
"Vladimir Oltean" <olteanv@gmail.com>,
"Vladimir Oltean" <vladimir.oltean@nxp.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"Jakub Kicinski" <kuba@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
"Florian Fainelli" <f.fainelli@gmail.com>,
"Vivien Didelot" <vivien.didelot@gmail.com>,
"Frank Rowand" <frowand.list@gmail.com>,
"Rob Herring" <robh+dt@kernel.org>
Subject: Re: [PATCH net] net: dsa: sja1105: fix use-after-free after calling of_find_compatible_node, or worse
Date: Fri, 20 Aug 2021 11:10:53 -0700 [thread overview]
Message-ID: <CAGETcx-47UCb+pgfvtSYLOM+XQE76e14Z2o6ihire5E=Ajbv0g@mail.gmail.com> (raw)
In-Reply-To: <YR/sWodANPdthPyA@lunn.ch>
On Fri, Aug 20, 2021 at 10:54 AM Andrew Lunn <andrew@lunn.ch> wrote:
>
> > 3. If dsa_register_switch() fails, we can't defer the probe (because
> > it already succeeded). But I'm not sure if it's a likely error code.
>
> That is not a safe assumption. The tagging driver can be a module, and
I don't know what "tagging driver" means. And yes, this is just a test
patch for now.
> not be loaded yet. So we defer probing to allow it to load.
>
> Ethernet switches can be a big graph of parts, not a nice tree of
> parts.
fw_devlink can handle graphs well. It has cycle detection for a reason
:) Look at slide 10 for a complicated example:
https://linuxplumbersconf.org/event/7/contributions/787/attachments/529/942/LPC_2020_-_fw_devlink.pdf
However, after sending that email I realized that fw_devlink=on would
make sure all the dependencies of this device would have probed first
before it allows this to probe. So EPROBE_DEFER can't really happen.
But for now I just want to see if it fixes the issue Alvin was seeing.
-Saravana
next prev parent reply other threads:[~2021-08-20 18:11 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-17 14:52 [PATCH net] net: dsa: sja1105: fix use-after-free after calling of_find_compatible_node, or worse Vladimir Oltean
2021-08-17 21:25 ` Alvin Šipraga
2021-08-17 22:05 ` Andrew Lunn
2021-08-17 22:19 ` Alvin Šipraga
2021-08-17 22:31 ` Vladimir Oltean
2021-08-17 22:40 ` Vladimir Oltean
2021-08-17 23:01 ` Alvin Šipraga
2021-08-18 2:46 ` Saravana Kannan
2021-08-18 10:18 ` Alvin Šipraga
2021-08-19 3:28 ` Saravana Kannan
2021-08-19 11:22 ` Vladimir Oltean
2021-08-19 13:46 ` Alvin Šipraga
2021-08-20 0:50 ` Saravana Kannan
2021-08-19 13:35 ` Andrew Lunn
2021-08-19 23:52 ` Saravana Kannan
2021-08-20 0:37 ` Vladimir Oltean
2021-08-20 1:25 ` Saravana Kannan
2021-08-20 13:01 ` Andrew Lunn
2021-08-19 13:42 ` Alvin Šipraga
2021-08-20 1:08 ` Saravana Kannan
2021-08-20 16:52 ` Saravana Kannan
2021-08-20 17:54 ` Andrew Lunn
2021-08-20 18:10 ` Saravana Kannan [this message]
2021-08-22 14:19 ` Alvin Šipraga
2021-08-23 18:50 ` Saravana Kannan
2021-08-23 20:43 ` Andrew Lunn
2021-08-23 21:23 ` Saravana Kannan
2021-08-25 13:40 ` Alvin Šipraga
2021-08-26 5:33 ` Saravana Kannan
2021-08-26 7:49 ` Saravana Kannan
2021-08-26 11:09 ` Alvin Šipraga
2021-08-18 9:30 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAGETcx-47UCb+pgfvtSYLOM+XQE76e14Z2o6ihire5E=Ajbv0g@mail.gmail.com' \
--to=saravanak@google.com \
--cc=ALSI@bang-olufsen.dk \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=frowand.list@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=robh+dt@kernel.org \
--cc=vivien.didelot@gmail.com \
--cc=vladimir.oltean@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).