Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Jan 2016 12:41:46 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r294220 - stable/10/sys/netinet
Message-ID:  <201601171241.u0HCfkLO089996@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Sun Jan 17 12:41:46 2016
New Revision: 294220
URL: https://svnweb.freebsd.org/changeset/base/294220

Log:
  MFC r292734:
  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.

Modified:
  stable/10/sys/netinet/sctp_output.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/netinet/sctp_output.c
==============================================================================
--- stable/10/sys/netinet/sctp_output.c	Sun Jan 17 12:39:35 2016	(r294219)
+++ stable/10/sys/netinet/sctp_output.c	Sun Jan 17 12:41:46 2016	(r294220)
@@ -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) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601171241.u0HCfkLO089996>