Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Jan 2015 17:49:08 +0000 (UTC)
From:      Craig Rodrigues <rodrigc@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r276841 - head/sys/netpfil/pf
Message-ID:  <201501081749.t08Hn8DM001724@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rodrigc
Date: Thu Jan  8 17:49:07 2015
New Revision: 276841
URL: https://svnweb.freebsd.org/changeset/base/276841

Log:
  Do not initialize pfi_unlnkdkifs_mtx and pf_frag_mtx.
  They are already initialized by MTX_SYSINIT.
  
  Submitted by: Nikos Vassiliadis <nvass@gmx.com>

Modified:
  head/sys/netpfil/pf/pf_if.c
  head/sys/netpfil/pf/pf_norm.c

Modified: head/sys/netpfil/pf/pf_if.c
==============================================================================
--- head/sys/netpfil/pf/pf_if.c	Thu Jan  8 17:46:42 2015	(r276840)
+++ head/sys/netpfil/pf/pf_if.c	Thu Jan  8 17:49:07 2015	(r276841)
@@ -117,10 +117,6 @@ pfi_vnet_initialize(void)
 	V_pfi_buffer_max = 64;
 	V_pfi_buffer = malloc(V_pfi_buffer_max * sizeof(*V_pfi_buffer),
 	    PFI_MTYPE, M_WAITOK);
-
-	if (IS_DEFAULT_VNET(curvnet))
-	    mtx_init(&pfi_unlnkdkifs_mtx, "pf unlinked interfaces", NULL, MTX_DEF);
-
 	kif = malloc(sizeof(*kif), PFI_MTYPE, M_WAITOK);
 	PF_RULES_WLOCK();
 	V_pfi_all = pfi_kif_attach(kif, IFG_ALL);

Modified: head/sys/netpfil/pf/pf_norm.c
==============================================================================
--- head/sys/netpfil/pf/pf_norm.c	Thu Jan  8 17:46:42 2015	(r276840)
+++ head/sys/netpfil/pf/pf_norm.c	Thu Jan  8 17:49:07 2015	(r276841)
@@ -163,10 +163,6 @@ pf_vnet_normalize_init(void)
 	V_pf_limits[PF_LIMIT_FRAGS].limit = PFFRAG_FRENT_HIWAT;
 	uma_zone_set_max(V_pf_frent_z, PFFRAG_FRENT_HIWAT);
 	uma_zone_set_warning(V_pf_frent_z, "PF frag entries limit reached");
-
-	if (IS_DEFAULT_VNET(curvnet))
-	    mtx_init(&pf_frag_mtx, "pf fragments", NULL, MTX_DEF);
-
 	TAILQ_INIT(&V_pf_fragqueue);
 	TAILQ_INIT(&V_pf_cachequeue);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501081749.t08Hn8DM001724>