tipc: use sock_create_kern interface to create kernel socket
authorYing Xue <ying.xue@windriver.com>
Wed, 13 May 2015 03:20:38 +0000 (11:20 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 14 May 2015 17:39:33 +0000 (13:39 -0400)
After commit eeb1bd5c40ed ("net: Add a struct net parameter to
sock_create_kern"), we should use sock_create_kern() to create kernel
socket as the interface doesn't reference count struct net any more.

Signed-off-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/server.c

index a91a2f79209ab19b38829aa106ff56d8e58e5520..922e04a43396db1f19fa6f1721a29840fb9b45d8 100644 (file)
@@ -325,7 +325,7 @@ static struct socket *tipc_create_listen_sock(struct tipc_conn *con)
        struct socket *sock = NULL;
        int ret;
 
-       ret = __sock_create(s->net, AF_TIPC, SOCK_SEQPACKET, 0, &sock, 1);
+       ret = sock_create_kern(s->net, AF_TIPC, SOCK_SEQPACKET, 0, &sock);
        if (ret < 0)
                return NULL;
        ret = kernel_setsockopt(sock, SOL_TIPC, TIPC_IMPORTANCE,