]> git.neil.brown.name Git - history.git/commitdiff
o netlink: use revised net module infrastructure
authorArnaldo Carvalho de Melo <acme@conectiva.com.br>
Sat, 3 May 2003 00:31:41 +0000 (21:31 -0300)
committerArnaldo Carvalho de Melo <acme@conectiva.com.br>
Sat, 3 May 2003 00:31:41 +0000 (21:31 -0300)
Using sk_set_owner and having THIS_MODULE in the struct proto_ops registered
with the core.

net/netlink/af_netlink.c

index e972bef4285960a98f803b7aea11443a7a9742dd..27e47ed4ba6d2cf15bb7a8b9965fd575c62162f4 100644 (file)
@@ -235,6 +235,7 @@ static int netlink_create(struct socket *sock, int protocol)
                return -ENOMEM;
 
        sock_init_data(sock,sk);
+       sk_set_owner(sk, THIS_MODULE);
 
        nlk = nlk_sk(sk) = kmalloc(sizeof(*nlk), GFP_KERNEL);
        if (!nlk) {
@@ -1030,7 +1031,7 @@ int netlink_unregister_notifier(struct notifier_block *nb)
                 
 struct proto_ops netlink_ops = {
        .family =       PF_NETLINK,
-
+       .owner =        THIS_MODULE,
        .release =      netlink_release,
        .bind =         netlink_bind,
        .connect =      netlink_connect,