[PATCH v4 07/16] net: dsa: Fix segmentation fault if master fails to probe

Vladimir Oltean vladimir.oltean at nxp.com
Wed May 18 16:29:53 CEST 2022


On Thu, May 05, 2022 at 01:11:36PM -0400, Sean Anderson wrote:
> If the DSA master fails to probe for whatever reason, then DSA devices
> will continue on as if nothing is wrong. This can cause incorrect
> behavior. In particular, on sandbox, dsa_sandbox_probe attempts to
> access the master's private data. This is only safe to do if the master
> has been probed first. Fix this by probing the master after we look it
> up, and bailing out if we get an error.
> 
> Fixes: fc054d563b ("net: Introduce DSA class for Ethernet switches")
> Signed-off-by: Sean Anderson <sean.anderson at seco.com>
> ---

Reviewed-by: Vladimir Oltean <vladimir.oltean at nxp.com>


More information about the U-Boot mailing list