diff options
author | Ingo Molnar <mingo@kernel.org> | 2020-01-20 10:05:16 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2020-01-20 10:05:16 +0300 |
commit | a786810cc864e31237a755b933e8872ba3e118bc (patch) | |
tree | f94bd068691d03be00b582fd2fdabe7ccff0f044 /net/x25/af_x25.c | |
parent | 4444f8541dad16fefd9b8807ad1451e806ef1d94 (diff) | |
parent | def9d2780727cec3313ed3522d0123158d87224d (diff) | |
download | linux-a786810cc864e31237a755b933e8872ba3e118bc.tar.xz |
Merge tag 'v5.5-rc7' into efi/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'net/x25/af_x25.c')
-rw-r--r-- | net/x25/af_x25.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index 2efe44a34644..d5b09bbff375 100644 --- a/net/x25/af_x25.c +++ b/net/x25/af_x25.c @@ -766,6 +766,10 @@ static int x25_connect(struct socket *sock, struct sockaddr *uaddr, if (sk->sk_state == TCP_ESTABLISHED) goto out; + rc = -EALREADY; /* Do nothing if call is already in progress */ + if (sk->sk_state == TCP_SYN_SENT) + goto out; + sk->sk_state = TCP_CLOSE; sock->state = SS_UNCONNECTED; @@ -812,7 +816,7 @@ static int x25_connect(struct socket *sock, struct sockaddr *uaddr, /* Now the loop */ rc = -EINPROGRESS; if (sk->sk_state != TCP_ESTABLISHED && (flags & O_NONBLOCK)) - goto out_put_neigh; + goto out; rc = x25_wait_for_connection_establishment(sk); if (rc) |