Add a state to sanity check tcp_close() to make sure it is not called
authorMatthew Dillon <dillon@dragonflybsd.org>
Wed, 11 Aug 2004 02:36:22 +0000 (02:36 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Wed, 11 Aug 2004 02:36:22 +0000 (02:36 +0000)
commiteb594563983a3301edb84a722676e402b85a2f0d
treedf43a23d12fdc092ed77712792575cb52b3469ae
parent19be7d321ec77ee1f9aff7526827a63cc212318f
Add a state to sanity check tcp_close() to make sure it is not called
twice.

Add a 'cpu' field to the inpcb so the cpu owning a pcb can be made
well-known, for use in later assertions as we move closer to removing
the BGL.

Fix a bug in the closing of listen sockets.  The inp wildcard hash table
removal was being done asynchronously with the freeing of the inp, which
could lead to problems.  Instead of sending messages in parallel to all tcp
protocol threads to remove the wildcard hash we instead chain a single
message through all tcp protocol threads to remove the hash, then detach the
inp at the end of the chain.

There is still an issue with the socket being ripped out from under other
protocol threads which might be trying to accept connections on behalf of
the listen socket which must be resolved before the BGL can be removed (amoung
other things).
sys/netinet/in_pcb.c
sys/netinet/in_pcb.h
sys/netinet/tcp_fsm.h
sys/netinet/tcp_input.c
sys/netinet/tcp_subr.c
sys/netinet/tcp_usrreq.c