Date: Sat, 25 Dec 2004 22:32:44 +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_subr.c Message-ID: <200412252232.iBPMWiZO069728@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
rwatson 2004-12-25 22:32:44 UTC
FreeBSD src repository
Modified files: (Branch: RELENG_5)
sys/netinet tcp_subr.c
Log:
Merge tcp_subr.c:1.210 from HEAD to RELENG_5:
date: 2004/11/23 16:23:13; author: rwatson; state: Exp; lines: +10 -0
Assert the inpcb lock in tcp_twstart(), which does both read-modify-write
on the tcpcb, but also calls into tcp_close() and tcp_twrespond().
Annotate that tcp_twrecycleable() requires the inpcb lock because it does
a series of non-atomic reads of the tcpcb, but is currently called
without the inpcb lock by the caller. This is a bug.
Assert the inpcb lock in tcp_twclose() as it performs a read-modify-write
of the timewait structure/inpcb, and calls in_pcbdetach() which requires
the lock.
Assert the inpcb lock in tcp_twrespond(), as it performs multiple
non-atomic reads of the tcptw and inpcb structures, as well as calling
mac_create_mbuf_from_inpcb(), tcpip_fillheaders(), which require the
inpcb lock.
MFC after: 2 weeks
Revision Changes Path
1.201.2.7 +10 -0 src/sys/netinet/tcp_subr.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200412252232.iBPMWiZO069728>
