diff mbox

[net,3/3] rhashtable: allow to unload test module

Message ID c0c78ef9a196812dc8a2922bb2a957a04c6dbfb6.1424389682.git.daniel@iogearbox.net
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Daniel Borkmann Feb. 19, 2015, 11:53 p.m. UTC
There's no good reason why to disallow unloading of the rhashtable
test case module.

Commit 9d6dbe1bbaf8 moved the code from a boot test into a stand-alone
module, but only converted the subsys_initcall() handler into a
module_init() function without a related exit handler, and thus
preventing the test module from unloading.

Fixes: 9d6dbe1bbaf8 ("rhashtable: Make selftest modular")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
---
 lib/test_rhashtable.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Thomas Graf Feb. 20, 2015, 12:01 p.m. UTC | #1
On 02/20/15 at 12:53am, Daniel Borkmann wrote:
> There's no good reason why to disallow unloading of the rhashtable
> test case module.
> 
> Commit 9d6dbe1bbaf8 moved the code from a boot test into a stand-alone
> module, but only converted the subsys_initcall() handler into a
> module_init() function without a related exit handler, and thus
> preventing the test module from unloading.
> 
> Fixes: 9d6dbe1bbaf8 ("rhashtable: Make selftest modular")
> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>

Acked-by: Thomas Graf <tgraf@suug.ch>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/lib/test_rhashtable.c b/lib/test_rhashtable.c
index 1dfeba7..9c5fcce 100644
--- a/lib/test_rhashtable.c
+++ b/lib/test_rhashtable.c
@@ -222,6 +222,11 @@  static int __init test_rht_init(void)
 	return err;
 }
 
+static void __exit test_rht_exit(void)
+{
+}
+
 module_init(test_rht_init);
+module_exit(test_rht_exit);
 
 MODULE_LICENSE("GPL v2");