lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 2 Mar 2019 20:31:02 +0800
From:   linmiaohe <linmiaohe@...wei.com>
To:     David Ahern <dsa@...ulusnetworks.com>,
        Shrijeet Mukherjee <shrijeet@...il.com>,
        <netdev@...r.kernel.org>
CC:     Mingfangsen <mingfangsen@...wei.com>
Subject: [PATCH net] net: vrf: fix remove vrf module error when there's no
 reference

From: Miaohe Lin <linmiaohe@...wei.com>

If we insmod vrf.ko, there is no way to remove it because of lack of module_exit.
I think we may need it.

Signed-off-by: Miaohe Lin <linmiaohe@...wei.com>
---
 drivers/net/vrf.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c
index 7c1430ed0244..0e93690482d4 100644
--- a/drivers/net/vrf.c
+++ b/drivers/net/vrf.c
@@ -1462,7 +1462,15 @@ static int __init vrf_init_module(void)
 	return rc;
 }

+static void __exit vrf_fini_module(void)
+{
+	rtnl_link_unregister(&vrf_link_ops);
+	unregister_pernet_subsys(&vrf_net_ops);
+	unregister_netdevice_notifier(&vrf_notifier_block);
+}
+
 module_init(vrf_init_module);
+module_exit(vrf_fini_module);
 MODULE_AUTHOR("Shrijeet Mukherjee, David Ahern");
 MODULE_DESCRIPTION("Device driver to instantiate VRF domains");
 MODULE_LICENSE("GPL");
-- 
2.16.2



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ