]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: airoha: Move net_devs registration in a dedicated routine
authorLorenzo Bianconi <lorenzo@kernel.org>
Sun, 14 Dec 2025 09:30:07 +0000 (10:30 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Jan 2026 09:16:45 +0000 (10:16 +0100)
commit0b4fa7ac13061158030744f6991b0aa696e0f173
treece2ae619959dcbf655a6c729f7e89d573caf2d94
parentb71187648ef2349254673d0523fdf96d1fe3d758
net: airoha: Move net_devs registration in a dedicated routine

[ Upstream commit 5e7365b5a1ac8f517a7a84442289d7de242deb76 ]

Since airoha_probe() is not executed under rtnl lock, there is small race
where a given device is configured by user-space while the remaining ones
are not completely loaded from the dts yet. This condition will allow a
hw device misconfiguration since there are some conditions (e.g. GDM2 check
in airoha_dev_init()) that require all device are properly loaded from the
device tree. Fix the issue moving net_devices registration at the end of
the airoha_probe routine.

Fixes: 9cd451d414f6e ("net: airoha: Add loopback support for GDM2")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20251214-airoha-fix-dev-registration-v1-1-860e027ad4c6@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/airoha/airoha_eth.c