Subject: CVS commit: src
To: None <source-changes@NetBSD.org>
From: Havard Eidnes <he@netbsd.org>
List: source-changes
Date: 07/20/2003 16:35:12
Module Name:	src
Committed By:	he
Date:		Sun Jul 20 16:35:12 UTC 2003

Modified Files:
	src/sys/netinet: tcp_input.c tcp_subr.c tcp_timer.c tcp_var.h
	src/usr.bin/netstat: inet.c

Log Message:
As a temporary workaround, apply the fix from PR#20390, thereby
cooperating with the callout code in working around the race
condition caused by the TCP code's use of the callout facility.

Instead of unconditionally releasing memory in tcp_close() and
SYN_CACHE_PUT(), check whether any of the related callout handlers
are about to be invoked (but have not yet done callout_ack()), and
if so, just mark the associated data structure (tcpcb or syn cache
entry) as "dead", and test for this (and release storage) in the
callout handler functions.


To generate a diff of this commit:
cvs rdiff -r1.172 -r1.173 src/sys/netinet/tcp_input.c
cvs rdiff -r1.143 -r1.144 src/sys/netinet/tcp_subr.c
cvs rdiff -r1.62 -r1.63 src/sys/netinet/tcp_timer.c
cvs rdiff -r1.102 -r1.103 src/sys/netinet/tcp_var.h
cvs rdiff -r1.56 -r1.57 src/usr.bin/netstat/inet.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.