net: team: check register_netdevice_notifier() error in team_module_init()
Subsystems (3)
PATCH 1/1 net: team: check register_netdevice_notifier() error in team_module_init()
team_module_init() ignores register_netdevice_notifier() errors and continues module initialization, which can leave the team module loaded without its netdev notifier registered.
Check the error and fail module initialization early.
--- drivers/net/team/team_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/team/team_core.c +3 -1
@@ -3229,7 +3229,9 @@ static int __init team_module_init(void) {int err; -register_netdevice_notifier (&team_notifier_block); + err =register_netdevice_notifier (&team_notifier_block); +if (err) +return err; err =rtnl_link_register (&team_link_ops);if (err)
Signature · 1 line
2.25.1
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 9 lines · On Mon, 3 Aug 2026 16:59:43 +0800 you wrote:
team_module_init()ignoresregister_netdevice_notifier()errors and continues module initialization, which can leave the team module loaded without its netdev notifier registered.Check the error and fail module initialization early.
Signed-off-by Minhong He <[email protected]>[...]
Here is the summary with links:
- [net] net: team: check register_netdevice_notifier() error in team_module_init()
https://git.kernel.org/netdev/net-next/c/c1293e4a34e2
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html