aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc/socket.c')
-rw-r--r--net/tipc/socket.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index f485600c4507..46b6ed534ef2 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -41,6 +41,7 @@
41#include "link.h" 41#include "link.h"
42#include "name_distr.h" 42#include "name_distr.h"
43#include "socket.h" 43#include "socket.h"
44#include "bcast.h"
44 45
45#define SS_LISTENING -1 /* socket is listening */ 46#define SS_LISTENING -1 /* socket is listening */
46#define SS_READY -2 /* socket is connectionless */ 47#define SS_READY -2 /* socket is connectionless */
@@ -342,7 +343,7 @@ static int tipc_sk_create(struct net *net, struct socket *sock,
342 } 343 }
343 344
344 /* Allocate socket's protocol area */ 345 /* Allocate socket's protocol area */
345 sk = sk_alloc(net, AF_TIPC, GFP_KERNEL, &tipc_proto); 346 sk = sk_alloc(net, AF_TIPC, GFP_KERNEL, &tipc_proto, kern);
346 if (sk == NULL) 347 if (sk == NULL)
347 return -ENOMEM; 348 return -ENOMEM;
348 349
@@ -409,7 +410,7 @@ static int tipc_release(struct socket *sock)
409 struct net *net; 410 struct net *net;
410 struct tipc_sock *tsk; 411 struct tipc_sock *tsk;
411 struct sk_buff *skb; 412 struct sk_buff *skb;
412 u32 dnode, probing_state; 413 u32 dnode;
413 414
414 /* 415 /*
415 * Exit if socket isn't fully initialized (occurs when a failed accept() 416 * Exit if socket isn't fully initialized (occurs when a failed accept()
@@ -447,10 +448,7 @@ static int tipc_release(struct socket *sock)
447 } 448 }
448 449
449 tipc_sk_withdraw(tsk, 0, NULL); 450 tipc_sk_withdraw(tsk, 0, NULL);
450 probing_state = tsk->probing_state; 451 sk_stop_timer(sk, &sk->sk_timer);
451 if (del_timer_sync(&sk->sk_timer) &&
452 probing_state != TIPC_CONN_PROBING)
453 sock_put(sk);
454 tipc_sk_remove(tsk); 452 tipc_sk_remove(tsk);
455 if (tsk->connected) { 453 if (tsk->connected) {
456 skb = tipc_msg_create(TIPC_CRITICAL_IMPORTANCE, 454 skb = tipc_msg_create(TIPC_CRITICAL_IMPORTANCE,