Subject: Re: [PATCH net] net: dsa: sja1105: fix use-after-free after calling of_find_compatible_node, or worse

From: Andrew Lunn <[email-masked]>
Date: Fri, 20 Aug 2021 19:54:34 +0200

> 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
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.

    Andrew