mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
mpls: add missing unregister_netdevice_notifier to mpls_init
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: 5be2062e30 ("mpls: Handle error of rtnl_register_module().")
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Link: https://patch.msgid.link/7c55363c4f743d19e2306204a134407c90a69bbb.1773228081.git.sd@queasysnail.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
8431c602f5
commit
99600f79b2
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user