svn commit: r215592 - stable/8/sys/netinet
Michael Tuexen
tuexen at FreeBSD.org
Sat Nov 20 21:24:18 UTC 2010
Author: tuexen
Date: Sat Nov 20 21:24:17 2010
New Revision: 215592
URL: http://svn.freebsd.org/changeset/base/215592
Log:
MFC r215241:
Fix a locking issue reported by brucec@ affecting
1-to-1 style sockets which have not yet been
accepted.
Modified:
stable/8/sys/netinet/sctp_pcb.c
Directory Properties:
stable/8/sys/ (props changed)
stable/8/sys/amd64/include/xen/ (props changed)
stable/8/sys/cddl/contrib/opensolaris/ (props changed)
stable/8/sys/contrib/dev/acpica/ (props changed)
stable/8/sys/contrib/pf/ (props changed)
stable/8/sys/dev/xen/xenpci/ (props changed)
Modified: stable/8/sys/netinet/sctp_pcb.c
==============================================================================
--- stable/8/sys/netinet/sctp_pcb.c Sat Nov 20 21:22:20 2010 (r215591)
+++ stable/8/sys/netinet/sctp_pcb.c Sat Nov 20 21:24:17 2010 (r215592)
@@ -3464,6 +3464,7 @@ sctp_inpcb_free(struct sctp_inpcb *inp,
cnt = 0;
for ((asoc = LIST_FIRST(&inp->sctp_asoc_list)); asoc != NULL;
asoc = nasoc) {
+ SCTP_TCB_LOCK(asoc);
nasoc = LIST_NEXT(asoc, sctp_tcblist);
if (asoc->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) {
if (asoc->asoc.state & SCTP_STATE_IN_ACCEPT_QUEUE) {
@@ -3471,10 +3472,10 @@ sctp_inpcb_free(struct sctp_inpcb *inp,
sctp_timer_start(SCTP_TIMER_TYPE_ASOCKILL, inp, asoc, NULL);
}
cnt++;
+ SCTP_TCB_UNLOCK(asoc);
continue;
}
/* Free associations that are NOT killing us */
- SCTP_TCB_LOCK(asoc);
if ((SCTP_GET_STATE(&asoc->asoc) != SCTP_STATE_COOKIE_WAIT) &&
((asoc->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) == 0)) {
struct mbuf *op_err;
More information about the svn-src-stable
mailing list