diff options
author | Ursula Braun <ursula.braun@de.ibm.com> | 2009-04-21 06:04:20 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-04-21 23:43:13 -0700 |
commit | bbe188c8f16effd902d1ad391e06e41ce649b22e (patch) | |
tree | 1fde9d3cdf87e0c86c47cb0b74350c5b52c42302 /net/iucv/af_iucv.c | |
parent | df833b1d73680f9f9dc72cbc3215edbbc6ab740d (diff) |
af_iucv: consider state IUCV_CLOSING when closing a socket
Make sure a second invocation of iucv_sock_close() guarantees proper
freeing of an iucv path.
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/iucv/af_iucv.c')
-rw-r--r-- | net/iucv/af_iucv.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/iucv/af_iucv.c b/net/iucv/af_iucv.c index 49e786535dc8..2941ee50393b 100644 --- a/net/iucv/af_iucv.c +++ b/net/iucv/af_iucv.c @@ -172,6 +172,7 @@ static void iucv_sock_close(struct sock *sk) err = iucv_sock_wait_state(sk, IUCV_CLOSED, 0, timeo); } + case IUCV_CLOSING: /* fall through */ sk->sk_state = IUCV_CLOSED; sk->sk_state_change(sk); @@ -224,6 +225,8 @@ static struct sock *iucv_sock_alloc(struct socket *sock, int proto, gfp_t prio) spin_lock_init(&iucv_sk(sk)->message_q.lock); skb_queue_head_init(&iucv_sk(sk)->backlog_skb_q); iucv_sk(sk)->send_tag = 0; + iucv_sk(sk)->path = NULL; + memset(&iucv_sk(sk)->src_user_id , 0, 32); sk->sk_destruct = iucv_sock_destruct; sk->sk_sndtimeo = IUCV_CONN_TIMEOUT; |