Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 214521
b: refs/heads/master
c: 141646c
h: refs/heads/master
i:
  214519: b469dde
v: v3
  • Loading branch information
Andrew Hendry authored and David S. Miller committed Sep 15, 2010
1 parent 2ed25f5 commit c6b6889
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 90c27297a9bfb8ea11c0e3f73ad90c4c66e8501e
refs/heads/master: 141646ce56735cedb2336b3cd21364287f0aa4c7
8 changes: 5 additions & 3 deletions trunk/net/x25/af_x25.c
Original file line number Diff line number Diff line change
Expand Up @@ -869,15 +869,18 @@ static int x25_accept(struct socket *sock, struct socket *newsock, int flags)
struct sk_buff *skb;
int rc = -EINVAL;

lock_kernel();
if (!sk || sk->sk_state != TCP_LISTEN)
if (!sk)
goto out;

rc = -EOPNOTSUPP;
if (sk->sk_type != SOCK_SEQPACKET)
goto out;

lock_sock(sk);
rc = -EINVAL;
if (sk->sk_state != TCP_LISTEN)
goto out2;

rc = x25_wait_for_data(sk, sk->sk_rcvtimeo);
if (rc)
goto out2;
Expand All @@ -897,7 +900,6 @@ static int x25_accept(struct socket *sock, struct socket *newsock, int flags)
out2:
release_sock(sk);
out:
unlock_kernel();
return rc;
}

Expand Down

0 comments on commit c6b6889

Please sign in to comment.