diff options
author | David S. Miller <davem@davemloft.net> | 2008-12-06 07:54:40 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-06 07:54:40 +0100 |
commit | 730c30ec646bd252a9448a66ecd51d794853513f (patch) | |
tree | c0d413860f9d8bf37374f17cfabb4911143465d7 /net/atm/svc.c | |
parent | tcp: move some parts from tcp_write_xmit (diff) | |
parent | Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linvil... (diff) | |
download | linux-730c30ec646bd252a9448a66ecd51d794853513f.tar.xz linux-730c30ec646bd252a9448a66ecd51d794853513f.zip |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/wireless/iwlwifi/iwl-core.c
drivers/net/wireless/iwlwifi/iwl-sta.c
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 e9c65500f84e..7b831b526d0b 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: |