]> git.baikalelectronics.ru Git - kernel.git/commit
inet: Fix virt-manager regression due to bind(0) changes.
authorStephen Hemminger <shemminger@vyatta.com>
Sun, 1 Feb 2009 09:40:17 +0000 (01:40 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 1 Feb 2009 09:40:17 +0000 (01:40 -0800)
commit9e7a7d1a36b21df9cf84941a54e351b8aae25df5
tree4d9bde7687e838a23ba6c1f0b2c3c97322fa6b5d
parent0cc6610be8271ed63419bcdae9c9e35e339128ba
inet: Fix virt-manager regression due to bind(0) changes.

From: Stephen Hemminger <shemminger@vyatta.com>

Fix regression introduced by 4b00edfcd96c24348e98f0f17fe6c51963612c19
("inet: Allowing more than 64k connections and heavily optimize
bind(0) time.")

Based upon initial patches and feedback from Evegniy Polyakov and
Eric Dumazet.

From Eric Dumazet:
--------------------
Also there might be a problem at line 175

if (sk->sk_reuse && sk->sk_state != TCP_LISTEN && --attempts >= 0) {
spin_unlock(&head->lock);
goto again;

If we entered inet_csk_get_port() with a non null snum, we can "goto again"
while it was not expected.
--------------------

Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/inet_connection_sock.c