aha/include
Eric Dumazet 3cdaedae63 tcp: Fix a connect() race with timewait sockets
When we find a timewait connection in __inet_hash_connect() and reuse
it for a new connection request, we have a race window, releasing bind
list lock and reacquiring it in __inet_twsk_kill() to remove timewait
socket from list.

Another thread might find the timewait socket we already chose, leading to
list corruption and crashes.

Fix is to remove timewait socket from bind list before releasing the bind lock.

Note: This problem happens if sysctl_tcp_tw_reuse is set.

Reported-by: kapil dakhane <kdakhane@gmail.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-08 20:17:51 -08:00
..
acpi
asm-generic Merge branch 'for-2.6.33' of git://git.kernel.dk/linux-2.6-block 2009-12-08 08:19:16 -08:00
crypto
drm
keys
linux Merge branch 'for-2.6.33' of git://git.kernel.dk/linux-2.6-block 2009-12-08 08:19:16 -08:00
math-emu
media
mtd
net tcp: Fix a connect() race with timewait sockets 2009-12-08 20:17:51 -08:00
pcmcia Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-2.6 2009-12-05 09:42:59 -08:00
rdma
rxrpc
scsi [SCSI] fix async scan add/remove race resulting in an oops 2009-11-26 09:43:39 -06:00
sound Merge branch 'topic/hda' into for-linus 2009-12-04 16:22:45 +01:00
trace Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-12-05 15:30:21 -08:00
video pxa168fb: remove useless vsync/hsync invert flag 2009-12-01 09:02:32 +08:00
xen
Kbuild