[NETLINK]: Add properly module refcounting for kernel netlink sockets.
- Remove bogus code for compiling netlink as module - Add module refcounting support for modules implementing a netlink protocol - Add support for autoloading modules that implement a netlink protocol as soon as someone opens a socket for that protocol Signed-off-by: Harald Welte <laforge@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Šī revīzija ir iekļauta:

revīziju iesūtīja
David S. Miller

vecāks
020b4c12db
revīzija
4fdb3bb723
@@ -138,7 +138,8 @@ static int __init init(void)
|
||||
{
|
||||
int rv = 0;
|
||||
|
||||
dnrmg = netlink_kernel_create(NETLINK_DNRTMSG, dnrmg_receive_user_sk);
|
||||
dnrmg = netlink_kernel_create(NETLINK_DNRTMSG, dnrmg_receive_user_sk,
|
||||
THIS_MODULE);
|
||||
if (dnrmg == NULL) {
|
||||
printk(KERN_ERR "dn_rtmsg: Cannot create netlink socket");
|
||||
return -ENOMEM;
|
||||
@@ -162,6 +163,7 @@ static void __exit fini(void)
|
||||
MODULE_DESCRIPTION("DECnet Routing Message Grabulator");
|
||||
MODULE_AUTHOR("Steven Whitehouse <steve@chygwyn.com>");
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_ALIAS_NET_PF_PROTO(PF_NETLINK, NETLINK_DNRTMSG);
|
||||
|
||||
module_init(init);
|
||||
module_exit(fini);
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user