Date: Mon, 20 Sep 2010 12:19:11 +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: r212897 - head/sys/netinet Message-ID: <201009201219.o8KCJBrp051528@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tuexen Date: Mon Sep 20 12:19:11 2010 New Revision: 212897 URL: http://svn.freebsd.org/changeset/base/212897 Log: Fix a locking issue which resulted in aborted associations due to a corrupted nr-mapping array. MFC after: 2 weeks. Modified: head/sys/netinet/sctp_indata.c Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Mon Sep 20 11:53:57 2010 (r212896) +++ head/sys/netinet/sctp_indata.c Mon Sep 20 12:19:11 2010 (r212897) @@ -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?201009201219.o8KCJBrp051528>