Date: Fri, 2 Jul 2010 09:53:26 +0000 (UTC) From: Randall Stewart <rrs@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r209644 - head/sys/netinet Message-ID: <201007020953.o629rQHI053961@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rrs Date: Fri Jul 2 09:53:26 2010 New Revision: 209644 URL: http://svn.freebsd.org/changeset/base/209644 Log: 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-unlock is called NOT the read-unlock. Under conditions where lots of associations are coming and going this will cause the system to panic at some point. MFC after: 3 days Modified: head/sys/netinet/sctp_pcb.c Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Fri Jul 2 09:23:06 2010 (r209643) +++ head/sys/netinet/sctp_pcb.c Fri Jul 2 09:53:26 2010 (r209644) @@ -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); } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007020953.o629rQHI053961>