Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Jun 2016 12:41:03 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r302207 - head/sys/netinet
Message-ID:  <201606261241.u5QCf3N9064967@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Sun Jun 26 12:41:02 2016
New Revision: 302207
URL: https://svnweb.freebsd.org/changeset/base/302207

Log:
  This patch fixes a locking bug when a send() call blocks
  on an SCTP socket and the association is aborted by the
  peer.
  
  Approved by:	re (kib)
  MFC after:	1 week

Modified:
  head/sys/netinet/sctp_output.c

Modified: head/sys/netinet/sctp_output.c
==============================================================================
--- head/sys/netinet/sctp_output.c	Sun Jun 26 00:53:31 2016	(r302206)
+++ head/sys/netinet/sctp_output.c	Sun Jun 26 12:41:02 2016	(r302207)
@@ -13136,6 +13136,7 @@ sctp_lower_sosend(struct socket *so,
 				    asoc, stcb->asoc.total_output_queue_size);
 			}
 			if (stcb->asoc.state & SCTP_STATE_ABOUT_TO_BE_FREED) {
+				SOCKBUF_UNLOCK(&so->so_snd);
 				goto out_unlocked;
 			}
 			inqueue_bytes = stcb->asoc.total_output_queue_size - (stcb->asoc.chunks_on_out_queue * sizeof(struct sctp_data_chunk));



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