aboutsummaryrefslogtreecommitdiffstats
path: root/net/iucv
diff options
context:
space:
mode:
Diffstat (limited to 'net/iucv')
-rw-r--r--net/iucv/af_iucv.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c
index a48fd2871532..c23ed4ff04c6 100644
--- a/net/iucv/af_iucv.c
+++ b/net/iucv/af_iucv.c
@@ -361,10 +361,9 @@ static void iucv_sock_cleanup_listen(struct sock *parent)
361 } 361 }
362 362
363 parent->sk_state = IUCV_CLOSED; 363 parent->sk_state = IUCV_CLOSED;
364 sock_set_flag(parent, SOCK_ZAPPED);
365} 364}
366 365
367/* Kill socket */ 366/* Kill socket (only if zapped and orphaned) */
368static void iucv_sock_kill(struct sock *sk) 367static void iucv_sock_kill(struct sock *sk)
369{ 368{
370 if (!sock_flag(sk, SOCK_ZAPPED) || sk->sk_socket) 369 if (!sock_flag(sk, SOCK_ZAPPED) || sk->sk_socket)
@@ -426,17 +425,18 @@ static void iucv_sock_close(struct sock *sk)
426 425
427 skb_queue_purge(&iucv->send_skb_q); 426 skb_queue_purge(&iucv->send_skb_q);
428 skb_queue_purge(&iucv->backlog_skb_q); 427 skb_queue_purge(&iucv->backlog_skb_q);
429
430 sock_set_flag(sk, SOCK_ZAPPED);
431 break; 428 break;
432 429
433 default: 430 default:
434 sock_set_flag(sk, SOCK_ZAPPED); 431 sock_set_flag(sk, SOCK_ZAPPED);
432 /* nothing to do here */
435 break; 433 break;
436 } 434 }
437 435
436 /* mark socket for deletion by iucv_sock_kill() */
437 sock_set_flag(sk, SOCK_ZAPPED);
438
438 release_sock(sk); 439 release_sock(sk);
439 iucv_sock_kill(sk);
440} 440}
441 441
442static void iucv_sock_init(struct sock *sk, struct sock *parent) 442static void iucv_sock_init(struct sock *sk, struct sock *parent)