From owner-svn-src-all@FreeBSD.ORG Tue Oct 26 18:56:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38113106564A; Tue, 26 Oct 2010 18:56:56 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 264F58FC0A; Tue, 26 Oct 2010 18:56:56 +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 o9QIuu9s062273; Tue, 26 Oct 2010 18:56:56 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9QIuul3062271; Tue, 26 Oct 2010 18:56:56 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <201010261856.o9QIuul3062271@svn.freebsd.org> From: Randall Stewart Date: Tue, 26 Oct 2010 18:56:56 +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: r214388 - stable/8/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Oct 2010 18:56:56 -0000 Author: rrs Date: Tue Oct 26 18:56:55 2010 New Revision: 214388 URL: http://svn.freebsd.org/changeset/base/214388 Log: MFC of 209644 Log is: Fix a bug that will cause a panic. Basically a read-lock is being called to check the vtag-timewait cache. Then in two cases (where a vtag is bad i.e. in the time-wait state) the write-unlokc is called NOT the read-unlock. Under conditions where lots of associations are coming and going this willc ause the system to panic with invariants on. Modified: stable/8/sys/netinet/sctp_pcb.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_pcb.c ============================================================================== --- stable/8/sys/netinet/sctp_pcb.c Tue Oct 26 18:32:51 2010 (r214387) +++ stable/8/sys/netinet/sctp_pcb.c Tue Oct 26 18:56:55 2010 (r214388) @@ -6499,7 +6499,7 @@ sctp_is_vtag_good(struct sctp_inpcb *inp continue; } /* Its a used tag set */ - SCTP_INP_INFO_WUNLOCK(); + SCTP_INP_INFO_RUNLOCK(); return (0); } } @@ -6528,7 +6528,7 @@ skip_vtag_check: (twait_block->vtag_block[i].lport == lport) && (twait_block->vtag_block[i].rport == rport)) { /* Bad tag, sorry :< */ - SCTP_INP_INFO_WUNLOCK(); + SCTP_INP_INFO_RUNLOCK(); return (0); } }