diff --git a/drivers/net/netdevsim/fib.c b/drivers/net/netdevsim/fib.c index f61d094..d5c01b8 100644 --- a/drivers/net/netdevsim/fib.c +++ b/drivers/net/netdevsim/fib.c @@ -241,8 +241,8 @@ static int __net_init nsim_fib_netns_init(struct net *net)
void nsim_fib_exit(void) { - unregister_pernet_subsys(&nsim_fib_net_ops); unregister_fib_notifier(&nsim_fib_nb); + unregister_pernet_subsys(&nsim_fib_net_ops); }
int nsim_fib_init(void) @@ -257,6 +257,7 @@ int nsim_fib_init(void)
err = register_fib_notifier(&nsim_fib_nb, nsim_fib_dump_inconsistent); if (err < 0) { + unregister_pernet_subsys(&nsim_fib_net_ops); pr_err("Failed to register fib notifier\n"); goto err_out; }
Hi,
Thanks your for your patch.
Please provide the changelog. Refer to https://gitee.com/openeuler/kernel/blob/kernel-4.19/README
On 2020/6/8 20:42, liaichun wrote:
diff --git a/drivers/net/netdevsim/fib.c b/drivers/net/netdevsim/fib.c index f61d094..d5c01b8 100644 --- a/drivers/net/netdevsim/fib.c +++ b/drivers/net/netdevsim/fib.c @@ -241,8 +241,8 @@ static int __net_init nsim_fib_netns_init(struct net *net)
void nsim_fib_exit(void) {
- unregister_pernet_subsys(&nsim_fib_net_ops); unregister_fib_notifier(&nsim_fib_nb);
- unregister_pernet_subsys(&nsim_fib_net_ops);
}
int nsim_fib_init(void) @@ -257,6 +257,7 @@ int nsim_fib_init(void)
err = register_fib_notifier(&nsim_fib_nb, nsim_fib_dump_inconsistent); if (err < 0) {
pr_err("Failed to register fib notifier\n"); goto err_out; }unregister_pernet_subsys(&nsim_fib_net_ops);