Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 14957
b: refs/heads/master
c: 86c8f9d
h: refs/heads/master
i:
  14955: 62b4082
v: v3
  • Loading branch information
Herbert Xu authored and David S. Miller committed Dec 3, 2005
1 parent d60f056 commit 2e46edb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 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: 24c6927505ca77ee4ac25fb31dcd56f6506979ed
refs/heads/master: 86c8f9d158f68538a971a47206a46a22c7479bac
7 changes: 3 additions & 4 deletions trunk/net/ipv4/af_inet.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,13 +228,14 @@ static int inet_create(struct socket *sock, int protocol)
unsigned char answer_flags;
char answer_no_check;
int try_loading_module = 0;
int err = -ESOCKTNOSUPPORT;
int err;

sock->state = SS_UNCONNECTED;

/* Look for the requested type/protocol pair. */
answer = NULL;
lookup_protocol:
err = -ESOCKTNOSUPPORT;
rcu_read_lock();
list_for_each_rcu(p, &inetsw[sock->type]) {
answer = list_entry(p, struct inet_protosw, list);
Expand All @@ -252,6 +253,7 @@ static int inet_create(struct socket *sock, int protocol)
if (IPPROTO_IP == answer->protocol)
break;
}
err = -EPROTONOSUPPORT;
answer = NULL;
}

Expand Down Expand Up @@ -280,9 +282,6 @@ static int inet_create(struct socket *sock, int protocol)
err = -EPERM;
if (answer->capability > 0 && !capable(answer->capability))
goto out_rcu_unlock;
err = -EPROTONOSUPPORT;
if (!protocol)
goto out_rcu_unlock;

sock->ops = answer->ops;
answer_prot = answer->prot;
Expand Down

0 comments on commit 2e46edb

Please sign in to comment.