mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-09 14:50:19 +00:00
tipc: use sock_create_kern interface to create kernel socket
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>
This commit is contained in:
parent
dd3aa3b5fb
commit
fa787ae062
@ -325,7 +325,7 @@ static struct socket *tipc_create_listen_sock(struct tipc_conn *con)
|
|||||||
struct socket *sock = NULL;
|
struct socket *sock = NULL;
|
||||||
int ret;
|
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)
|
if (ret < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
ret = kernel_setsockopt(sock, SOL_TIPC, TIPC_IMPORTANCE,
|
ret = kernel_setsockopt(sock, SOL_TIPC, TIPC_IMPORTANCE,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user