The current code checks for conflicts when the application
requests a specific port. If there is no conflict, then
the request is granted.
On the other hand, the port autoselection done by the kernel
fails when all ports are bound even when there is a port
with no conflict available.
The fix changes port autoselection to check if there is a
conflict and use it if not.
Signed-off-by: Flavio Leitner <redacted>
---
net/ipv4/inet_connection_sock.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
Port autoselection finds a port and then drop the lock,
then right after that, gets the hash bucket again and lock it.
Fix it to go direct.
Signed-off-by: Flavio Leitner <redacted>
---
net/ipv4/inet_connection_sock.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
The current code checks for conflicts when the application
requests a specific port. If there is no conflict, then
the request is granted.
On the other hand, the port autoselection done by the kernel
fails when all ports are bound even when there is a port
with no conflict available.
The fix changes port autoselection to check if there is a
conflict and use it if not.
Signed-off-by: Flavio Leitner<redacted>
Port autoselection finds a port and then drop the lock,
then right after that, gets the hash bucket again and lock it.
Fix it to go direct.
Signed-off-by: Flavio Leitner<redacted>
From: Eric Dumazet <hidden> Date: 2012-01-25 18:47:39
Le mercredi 25 janvier 2012 à 16:34 -0200, Flavio Leitner a écrit :
quoted hunk
The current code checks for conflicts when the application
requests a specific port. If there is no conflict, then
the request is granted.
On the other hand, the port autoselection done by the kernel
fails when all ports are bound even when there is a port
with no conflict available.
The fix changes port autoselection to check if there is a
conflict and use it if not.
Signed-off-by: Flavio Leitner <redacted>
---
net/ipv4/inet_connection_sock.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
From: Eric Dumazet <hidden> Date: 2012-01-25 18:48:34
Le mercredi 25 janvier 2012 à 16:34 -0200, Flavio Leitner a écrit :
Port autoselection finds a port and then drop the lock,
then right after that, gets the hash bucket again and lock it.
Fix it to go direct.
Signed-off-by: Flavio Leitner <redacted>
---
The current code checks for conflicts when the application
requests a specific port. If there is no conflict, then
the request is granted.
On the other hand, the port autoselection done by the kernel
fails when all ports are bound even when there is a port
with no conflict available.
The fix changes port autoselection to check if there is a
conflict and use it if not.
Signed-off-by: Flavio Leitner <redacted>
Port autoselection finds a port and then drop the lock,
then right after that, gets the hash bucket again and lock it.
Fix it to go direct.
Signed-off-by: Flavio Leitner <redacted>