diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-12-20 23:42:55 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-12-20 23:42:55 +0100 |
commit | 6a8436419d1b77b24d82bd90354adc4baa393566 (patch) | |
tree | d20e17b148f37dc299658a60303e6a2e4e6ce63f /net/atm/svc.c | |
parent | 55fa518867978e1f5fd8353098f80d125ac734d7 (diff) | |
parent | ff75427a7f641c4468610fbda2ccb69218174cd1 (diff) |
Merge branch 'topic/ca0106-capture-no-44khz' into topic/ca0106
Diffstat (limited to 'net/atm/svc.c')
-rw-r--r-- | net/atm/svc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/atm/svc.c b/net/atm/svc.c index de1e4f2f3a4..8fb54dc870b 100644 --- a/net/atm/svc.c +++ b/net/atm/svc.c @@ -293,7 +293,10 @@ static int svc_listen(struct socket *sock,int backlog) error = -EINVAL; goto out; } - vcc_insert_socket(sk); + if (test_bit(ATM_VF_LISTEN, &vcc->flags)) { + error = -EADDRINUSE; + goto out; + } set_bit(ATM_VF_WAITING, &vcc->flags); prepare_to_wait(sk->sk_sleep, &wait, TASK_UNINTERRUPTIBLE); sigd_enq(vcc,as_listen,NULL,NULL,&vcc->local); @@ -307,6 +310,7 @@ static int svc_listen(struct socket *sock,int backlog) goto out; } set_bit(ATM_VF_LISTEN,&vcc->flags); + vcc_insert_socket(sk); sk->sk_max_ack_backlog = backlog > 0 ? backlog : ATM_BACKLOG_DEFAULT; error = -sk->sk_err; out: |