diff options
| author | Jiri Kosina <jkosina@suse.cz> | 2015-09-01 15:35:24 +0200 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.cz> | 2015-09-01 15:35:24 +0200 |
| commit | 067e2601d3c076abbf45db91261f9065eaa879b2 (patch) | |
| tree | 86c8d4b913873dbd3b4ff23562a3a8597984b4df /net/tipc/socket.c | |
| parent | 3e097d1271ecdff2f251a54ddfc5eaa1f9821e96 (diff) | |
| parent | 931830aa5c251e0803523213428f777a48bde254 (diff) | |
Merge branch 'for-4.3/gembird' into for-linus
Diffstat (limited to 'net/tipc/socket.c')
| -rw-r--r-- | net/tipc/socket.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c index f485600c4507..3a7567f690f3 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -41,6 +41,7 @@ #include "link.h" #include "name_distr.h" #include "socket.h" +#include "bcast.h" #define SS_LISTENING -1 /* socket is listening */ #define SS_READY -2 /* socket is connectionless */ @@ -342,7 +343,7 @@ static int tipc_sk_create(struct net *net, struct socket *sock, } /* Allocate socket's protocol area */ - sk = sk_alloc(net, AF_TIPC, GFP_KERNEL, &tipc_proto); + sk = sk_alloc(net, AF_TIPC, GFP_KERNEL, &tipc_proto, kern); if (sk == NULL) return -ENOMEM; @@ -409,7 +410,7 @@ static int tipc_release(struct socket *sock) struct net *net; struct tipc_sock *tsk; struct sk_buff *skb; - u32 dnode, probing_state; + u32 dnode; /* * Exit if socket isn't fully initialized (occurs when a failed accept() @@ -447,10 +448,7 @@ static int tipc_release(struct socket *sock) } tipc_sk_withdraw(tsk, 0, NULL); - probing_state = tsk->probing_state; - if (del_timer_sync(&sk->sk_timer) && - probing_state != TIPC_CONN_PROBING) - sock_put(sk); + sk_stop_timer(sk, &sk->sk_timer); tipc_sk_remove(tsk); if (tsk->connected) { skb = tipc_msg_create(TIPC_CRITICAL_IMPORTANCE, @@ -2009,6 +2007,7 @@ static int tipc_accept(struct socket *sock, struct socket *new_sock, int flags) res = tipc_sk_create(sock_net(sock->sk), new_sock, 0, 1); if (res) goto exit; + security_sk_clone(sock->sk, new_sock->sk); new_sk = new_sock->sk; new_tsock = tipc_sk(new_sk); |
