Date: Wed, 14 May 2014 18:20:36 +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-9@freebsd.org Subject: svn commit: r266067 - stable/9/sys/netinet Message-ID: <201405141820.s4EIKa5a073648@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tuexen Date: Wed May 14 18:20:35 2014 New Revision: 266067 URL: http://svnweb.freebsd.org/changeset/base/266067 Log: MFC r258765: In http://svnweb.freebsd.org/changeset/base/258221 I introduced a bug which initialized global locks whenever the SCTP stack initialized. This was fixed in http://svnweb.freebsd.org/changeset/base/258574 by rodrigc@. He just initialized the locks for the default vnet. This fix reverts to the old behaviour before r258221, which explicitly makes sure it is only called once, because this works also on other platforms. Modified: stable/9/sys/netinet/sctp_bsd_addr.c stable/9/sys/netinet/sctp_pcb.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/sctp_bsd_addr.c ============================================================================== --- stable/9/sys/netinet/sctp_bsd_addr.c Wed May 14 18:18:16 2014 (r266066) +++ stable/9/sys/netinet/sctp_bsd_addr.c Wed May 14 18:20:35 2014 (r266067) @@ -100,6 +100,9 @@ sctp_startup_iterator(void) /* You only get one */ return; } + /* Initialize global locks here, thus only once. */ + SCTP_ITERATOR_LOCK_INIT(); + SCTP_IPI_ITERATOR_WQ_INIT(); TAILQ_INIT(&sctp_it_ctl.iteratorhead); kproc_create(sctp_iterator_thread, (void *)NULL, Modified: stable/9/sys/netinet/sctp_pcb.c ============================================================================== --- stable/9/sys/netinet/sctp_pcb.c Wed May 14 18:18:16 2014 (r266066) +++ stable/9/sys/netinet/sctp_pcb.c Wed May 14 18:20:35 2014 (r266067) @@ -5864,14 +5864,6 @@ sctp_pcb_init() for (i = 0; i < SCTP_STACK_VTAG_HASH_SIZE; i++) { LIST_INIT(&SCTP_BASE_INFO(vtag_timewait)[i]); } - /* - * Only initialize non-VNET global mutexes for the - * default instance. - */ - if (IS_DEFAULT_VNET(curvnet)) { - SCTP_ITERATOR_LOCK_INIT(); - SCTP_IPI_ITERATOR_WQ_INIT(); - } sctp_startup_iterator(); #if defined(__FreeBSD__) && defined(SCTP_MCORE_INPUT) && defined(SMP)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405141820.s4EIKa5a073648>