aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/socket.c
diff options
context:
space:
mode:
authorParthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>2016-11-01 09:02:36 -0400
committerDavid S. Miller <davem@davemloft.net>2016-11-01 11:53:23 -0400
commitcb5da847af4418f91d0e83fc91c2fcb1def5537d (patch)
tree6855eec3e7ab63daa7e2bd2dce9792bee7fdb314 /net/tipc/socket.c
parent4891d8fe16343660b4c1ddbcca4792300b5fd4f4 (diff)
tipc: set kern=0 in sk_alloc() during tipc_accept()
Until now, tipc_accept() calls sk_alloc() with kern=1. This is incorrect as the data socket's owner is the user application. Thus for these accepted data sockets the network namespace refcount is skipped. In this commit, we fix this by setting kern=0. Acked-by: Ying Xue <ying.xue@windriver.com> Acked-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/socket.c')
-rw-r--r--net/tipc/socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index cd01deb1da9c..82aec2eb8497 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -2093,7 +2093,7 @@ static int tipc_accept(struct socket *sock, struct socket *new_sock, int flags)
2093 2093
2094 buf = skb_peek(&sk->sk_receive_queue); 2094 buf = skb_peek(&sk->sk_receive_queue);
2095 2095
2096 res = tipc_sk_create(sock_net(sock->sk), new_sock, 0, 1); 2096 res = tipc_sk_create(sock_net(sock->sk), new_sock, 0, 0);
2097 if (res) 2097 if (res)
2098 goto exit; 2098 goto exit;
2099 security_sk_clone(sock->sk, new_sock->sk); 2099 security_sk_clone(sock->sk, new_sock->sk);