[PATCH 0/2] tcp: Fix connect() races with timewait sockets

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Eric Dumazet
Date: Friday, December 4, 2009 - 6:45 am

Eric Dumazet a écrit :

I cooked two patches on top of net-next-2.6 to solve the two last
race problems I am aware of.

Kapil, if you want to test them, make sure you take last net-next-2.6 snapshot.

First patch changes __inet_hash_nolisten() and __inet6_hash()
to get a timewait parameter to be able to unhash it from ehash
at same time the new socket is inserted into ehash.

Second patch is a respin of the first patch I sent :
It makes sure __inet_has_connect() cannot give same timewait socket
to different threads.

Thanks !

Reported-by: kapil dakhane <kdakhane@gmail.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
soft lockup in inet_csk_get_port, kapil dakhane, (Mon Nov 30, 7:02 pm)
Re: soft lockup in inet_csk_get_port, Eric Dumazet, (Mon Nov 30, 11:10 pm)
Re: [PATCH] tcp: Fix a connect() race with timewait sockets, Evgeniy Polyakov, (Wed Dec 2, 4:32 am)
Re: soft lockup in inet_csk_get_port, kapil dakhane, (Wed Dec 2, 9:13 pm)
[PATCH] tcp: fix a timewait refcnt race, Eric Dumazet, (Thu Dec 3, 3:49 am)
Re: [PATCH] tcp: fix a timewait refcnt race, David Miller, (Thu Dec 3, 5:19 pm)
Re: [PATCH] tcp: fix a timewait refcnt race, kapil dakhane, (Thu Dec 3, 8:20 pm)
Re: [PATCH] tcp: fix a timewait refcnt race, Eric Dumazet, (Thu Dec 3, 11:29 pm)
Re: [PATCH] tcp: fix a timewait refcnt race, David Miller, (Thu Dec 3, 11:39 pm)
[PATCH 0/2] tcp: Fix connect() races with timewait sockets, Eric Dumazet, (Fri Dec 4, 6:45 am)
[PATCH] tcp: documents timewait refcnt tricks, Eric Dumazet, (Mon Dec 7, 2:59 am)
Re: [PATCH] tcp: documents timewait refcnt tricks, Randy Dunlap, (Mon Dec 7, 9:06 am)
Re: [PATCH] tcp: documents timewait refcnt tricks, David Miller, (Tue Dec 8, 9:20 pm)