Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Oct 2010 19:18:54 +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-8@freebsd.org
Subject:   svn commit: r214488 - stable/8/sys/netinet
Message-ID:  <201010281918.o9SJIs5D026649@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Thu Oct 28 19:18:54 2010
New Revision: 214488
URL: http://svn.freebsd.org/changeset/base/214488

Log:
  MFC r212897:
  Fix a locking issue which resulted in aborted associations
  due to a corrupted nr-mapping array.

Modified:
  stable/8/sys/netinet/sctp_indata.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_indata.c
==============================================================================
--- stable/8/sys/netinet/sctp_indata.c	Thu Oct 28 19:17:18 2010	(r214487)
+++ stable/8/sys/netinet/sctp_indata.c	Thu Oct 28 19:18:54 2010	(r214488)
@@ -1776,6 +1776,10 @@ sctp_process_a_data_chunk(struct sctp_tc
 		if (control == NULL) {
 			goto failed_express_del;
 		}
+		SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, gap);
+		if (compare_with_wrap(tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) {
+			asoc->highest_tsn_inside_nr_map = tsn;
+		}
 		sctp_add_to_readq(stcb->sctp_ep, stcb,
 		    control, &stcb->sctp_socket->so_rcv,
 		    1, SCTP_READ_LOCK_NOT_HELD, SCTP_SO_NOT_LOCKED);
@@ -1791,10 +1795,6 @@ sctp_process_a_data_chunk(struct sctp_tc
 		}
 		control = NULL;
 
-		SCTP_SET_TSN_PRESENT(asoc->nr_mapping_array, gap);
-		if (compare_with_wrap(tsn, asoc->highest_tsn_inside_nr_map, MAX_TSN)) {
-			asoc->highest_tsn_inside_nr_map = tsn;
-		}
 		goto finish_express_del;
 	}
 failed_express_del:



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