From owner-svn-src-stable-8@FreeBSD.ORG Thu Oct 28 19:03:26 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8254106564A; Thu, 28 Oct 2010 19:03:26 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A564B8FC18; Thu, 28 Oct 2010 19:03:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9SJ3Qrk024945; Thu, 28 Oct 2010 19:03:26 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9SJ3QoR024943; Thu, 28 Oct 2010 19:03:26 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201010281903.o9SJ3QoR024943@svn.freebsd.org> From: Michael Tuexen Date: Thu, 28 Oct 2010 19:03:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214476 - stable/8/sys/netinet X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Oct 2010 19:03:26 -0000 Author: tuexen Date: Thu Oct 28 19:03:26 2010 New Revision: 214476 URL: http://svn.freebsd.org/changeset/base/214476 Log: MFC r212711: Use TAILQ_EMPTY() for testing if a tail queue is empty. Set whoFrom to NULL after freeing whoFrom. 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:00:45 2010 (r214475) +++ stable/8/sys/netinet/sctp_indata.c Thu Oct 28 19:03:26 2010 (r214476) @@ -708,9 +708,10 @@ protocol_error: control->data = NULL; asoc->size_on_all_streams -= control->length; sctp_ucount_decr(asoc->cnt_on_all_streams); - if (control->whoFrom) + if (control->whoFrom) { sctp_free_remote_addr(control->whoFrom); - control->whoFrom = NULL; + control->whoFrom = NULL; + } sctp_free_a_readq(stcb, control); return; } else { @@ -4845,7 +4846,7 @@ sctp_handle_sack(struct mbuf *m, int off if (asoc->pr_sctp_cnt != 0) asoc->pr_sctp_cnt--; } - if ((TAILQ_FIRST(&asoc->sent_queue) == NULL) && + if (TAILQ_EMPTY(&asoc->sent_queue) && (asoc->total_flight > 0)) { #ifdef INVARIANTS panic("Warning flight size is postive and should be 0"); @@ -5818,7 +5819,7 @@ sctp_handle_forward_tsn(struct sctp_tcb */ sctp_slide_mapping_arrays(stcb); - if (TAILQ_FIRST(&asoc->reasmqueue)) { + if (!TAILQ_EMPTY(&asoc->reasmqueue)) { /* now lets kick out and check for more fragmented delivery */ /* sa_ignore NO_NULL_CHK */ sctp_deliver_reasm_check(stcb, &stcb->asoc);