* [PATCH net] mpls: add missing unregister_netdevice_notifier to mpls_init
@ 2026-03-11 22:35 Sabrina Dubroca
2026-03-13 2:50 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Sabrina Dubroca @ 2026-03-11 22:35 UTC (permalink / raw)
To: netdev; +Cc: Sabrina Dubroca, Kuniyuki Iwashima
If mpls_init() fails after registering mpls_dev_notifier, it never
gets removed. Add the missing unregister_netdevice_notifier() call to
the error handling path.
Fixes: 5be2062e3080 ("mpls: Handle error of rtnl_register_module().")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
---
net/mpls/af_mpls.c | 1 +
1 file changed, 1 insertion(+)
Sorry, Kuniyuki. It's a bit unfair, but prior to your patch, mpls_init
couldn't fail after register_netdevice_notifier :)
diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c
index ef9e749d5e08..d5417688f69e 100644
--- a/net/mpls/af_mpls.c
+++ b/net/mpls/af_mpls.c
@@ -2854,6 +2854,7 @@ static int __init mpls_init(void)
rtnl_af_unregister(&mpls_af_ops);
out_unregister_dev_type:
dev_remove_pack(&mpls_packet_type);
+ unregister_netdevice_notifier(&mpls_dev_notifier);
out_unregister_pernet:
unregister_pernet_subsys(&mpls_net_ops);
goto out;
--
2.51.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] mpls: add missing unregister_netdevice_notifier to mpls_init
2026-03-11 22:35 [PATCH net] mpls: add missing unregister_netdevice_notifier to mpls_init Sabrina Dubroca
@ 2026-03-13 2:50 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-03-13 2:50 UTC (permalink / raw)
To: Sabrina Dubroca; +Cc: netdev, kuniyu
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 11 Mar 2026 23:35:09 +0100 you wrote:
> If mpls_init() fails after registering mpls_dev_notifier, it never
> gets removed. Add the missing unregister_netdevice_notifier() call to
> the error handling path.
>
> Fixes: 5be2062e3080 ("mpls: Handle error of rtnl_register_module().")
> Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
>
> [...]
Here is the summary with links:
- [net] mpls: add missing unregister_netdevice_notifier to mpls_init
https://git.kernel.org/netdev/net/c/99600f79b28c
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-13 2:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-11 22:35 [PATCH net] mpls: add missing unregister_netdevice_notifier to mpls_init Sabrina Dubroca
2026-03-13 2:50 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox