lkml.org 
[lkml]   [2001]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subjectpatch: af_netlink rmmod problem
Date

hello,

when doing a series of insmod/rmmod of af_netlink, I noticed
/proc/net/netlink entries being added each time.

this small patch addresses the problem:

--- snip ---
bash-2.03# diff -u linux-2.4.5.orig/net/netlink/af_netlink.c linux-2.4.5.new/net/netlink/af_netlink.c
--- linux-2.4.5.orig/net/netlink/af_netlink.c Thu Apr 12 21:11:39 2001
+++ linux-2.4.5.new/net/netlink/af_netlink.c Tue Jun 26 14:41:25 2001
@@ -9,6 +9,9 @@
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*
+ * Tue Jun 26 14:36:48 MEST 2001 Herbert "herp" Rosmanith
+ * added netlink_proto_exit
+ *
*/

#include <linux/config.h>
@@ -985,4 +988,11 @@
return 0;
}

+static void __exit netlink_proto_exit(void)
+{
+ sock_unregister(PF_NETLINK);
+ remove_proc_entry("net/netlink", NULL);
+}
+
module_init(netlink_proto_init);
+module_exit(netlink_proto_exit);
--- snip ---
thanks,
h.rosmanith
herp@wildsau.idv.uni-linz.ac.at

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:55    [W:0.038 / U:1.664 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site