Date: Tue, 23 Nov 2004 17:21:30 +0000 (UTC) From: Robert Watson <rwatson@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/netinet tcp_input.c tcp_subr.c tcp_timer.c Message-ID: <200411231721.iANHLUBP059819@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
rwatson 2004-11-23 17:21:30 UTC FreeBSD src repository Modified files: sys/netinet tcp_input.c tcp_subr.c tcp_timer.c Log: tcp_timewait() performs multiple non-atomic reads on the tcptw structure, so assert the inpcb lock associated with the tcptw. Also assert the tcbinfo lock, as tcp_timewait() may call tcp_twclose() or tcp_2msl_rest(), which require it. Since tcp_timewait() is already called with that lock from tcp_input(), this doesn't change current locking, merely documents reasons for it. In tcp_twstart(), assert the tcbinfo lock, as tcp_timer_2msl_rest() is called, which requires that lock. In tcp_twclose(), assert the tcbinfo lock, as tcp_timer_2msl_stop() is called, which requires that lock. Document the locking strategy for the time wait queues in tcp_timer.c, which consists of protecting the time wait queues in the same manner as the tcbinfo structure (using the tcbinfo lock). In tcp_timer_2msl_reset(), assert the tcbinfo lock, as the time wait queues are modified. In tcp_timer_2msl_stop(), assert the tcbinfo lock, as the time wait queues may be modified. In tcp_timer_2msl_tw(), assert the tcbinfo lock, as the time wait queues may be modified. MFC after: 2 weeks Revision Changes Path 1.257 +4 -0 src/sys/netinet/tcp_input.c 1.211 +2 -0 src/sys/netinet/tcp_subr.c 1.69 +9 -0 src/sys/netinet/tcp_timer.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200411231721.iANHLUBP059819>