svn commit: r292734 - head/sys/netinet
Michael Tuexen
tuexen at FreeBSD.org
Fri Dec 25 18:11:42 UTC 2015
Author: tuexen
Date: Fri Dec 25 18:11:40 2015
New Revision: 292734
URL: https://svnweb.freebsd.org/changeset/base/292734
Log:
Don't implicitly terminate a user message when moving it to the
send_queue and the socket is closed. This results in strange
race conditions for the application.
While there, remove a stray character.
MFC after: 3 days
Modified:
head/sys/netinet/sctp_output.c
Modified: head/sys/netinet/sctp_output.c
==============================================================================
--- head/sys/netinet/sctp_output.c Fri Dec 25 16:19:21 2015 (r292733)
+++ head/sys/netinet/sctp_output.c Fri Dec 25 18:11:40 2015 (r292734)
@@ -7219,7 +7219,7 @@ one_more_time:
}
/* Whack down the size */
atomic_subtract_int(&stcb->asoc.total_output_queue_size, sp->length);
- if ((stcb->sctp_socket != NULL) && \
+ if ((stcb->sctp_socket != NULL) &&
((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) ||
(stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL))) {
atomic_subtract_int(&stcb->sctp_socket->so_snd.sb_cc, sp->length);
@@ -7238,9 +7238,6 @@ one_more_time:
}
}
some_taken = sp->some_taken;
- if (stcb->asoc.state & SCTP_STATE_CLOSED_SOCKET) {
- sp->msg_is_complete = 1;
- }
re_look:
length = sp->length;
if (sp->msg_is_complete) {
More information about the svn-src-all
mailing list