diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-08-23 14:06:56 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-08-23 14:06:56 -0400 |
commit | 3f024c1a4bc8ef9a149879351ce8b3aa749e0c2f (patch) | |
tree | 5539ec43768de877137c1971502a5e69cd9f0836 /net/ipv4/tcp_ipv4.c | |
parent | a4cce10492358b33d33bb43f98284c80482037e8 (diff) | |
parent | dc16aaf29d64b8c5e0b88f49a4d541edf5b61e42 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 5d91213d34c0..67c670886c1f 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -242,9 +242,14 @@ static int tcp_v4_get_port(struct sock *sk, unsigned short snum) | |||
242 | tcp_port_rover = rover; | 242 | tcp_port_rover = rover; |
243 | spin_unlock(&tcp_portalloc_lock); | 243 | spin_unlock(&tcp_portalloc_lock); |
244 | 244 | ||
245 | /* Exhausted local port range during search? */ | 245 | /* Exhausted local port range during search? It is not |
246 | * possible for us to be holding one of the bind hash | ||
247 | * locks if this test triggers, because if 'remaining' | ||
248 | * drops to zero, we broke out of the do/while loop at | ||
249 | * the top level, not from the 'break;' statement. | ||
250 | */ | ||
246 | ret = 1; | 251 | ret = 1; |
247 | if (remaining <= 0) | 252 | if (unlikely(remaining <= 0)) |
248 | goto fail; | 253 | goto fail; |
249 | 254 | ||
250 | /* OK, here is the one we will use. HEAD is | 255 | /* OK, here is the one we will use. HEAD is |