Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 5930
b: refs/heads/master
c: d5d2837
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Aug 23, 2005
1 parent 39d6cb6 commit f233603
Show file tree
Hide file tree
Showing 3 changed files with 15 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: 89ebd197eb2cd31d6187db344d5117064e19fdde
refs/heads/master: d5d283751ef3c05b6766501a46800cbee84959d6
9 changes: 7 additions & 2 deletions trunk/net/ipv4/tcp_ipv4.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,14 @@ static int tcp_v4_get_port(struct sock *sk, unsigned short snum)
tcp_port_rover = rover;
spin_unlock(&tcp_portalloc_lock);

/* Exhausted local port range during search? */
/* Exhausted local port range during search? It is not
* possible for us to be holding one of the bind hash
* locks if this test triggers, because if 'remaining'
* drops to zero, we broke out of the do/while loop at
* the top level, not from the 'break;' statement.
*/
ret = 1;
if (remaining <= 0)
if (unlikely(remaining <= 0))
goto fail;

/* OK, here is the one we will use. HEAD is
Expand Down
9 changes: 7 additions & 2 deletions trunk/net/ipv6/tcp_ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,14 @@ static int tcp_v6_get_port(struct sock *sk, unsigned short snum)
tcp_port_rover = rover;
spin_unlock(&tcp_portalloc_lock);

/* Exhausted local port range during search? */
/* Exhausted local port range during search? It is not
* possible for us to be holding one of the bind hash
* locks if this test triggers, because if 'remaining'
* drops to zero, we broke out of the do/while loop at
* the top level, not from the 'break;' statement.
*/
ret = 1;
if (remaining <= 0)
if (unlikely(remaining <= 0))
goto fail;

/* OK, here is the one we will use. */
Expand Down

0 comments on commit f233603

Please sign in to comment.