Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Mar 2019 07:07:45 +0000 (UTC)
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r345440 - stable/12/sys/netpfil/pf
Message-ID:  <201903230707.x2N77jDF083786@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kp
Date: Sat Mar 23 07:07:44 2019
New Revision: 345440
URL: https://svnweb.freebsd.org/changeset/base/345440

Log:
  MFC r345223:
  
  pf: Rename pfsync bucket lock
  
  Previously the main pfsync lock and the bucket locks shared the same name.
  This lead to spurious warnings from WITNESS like this:
  
      acquiring duplicate lock of same type: "pfsync"
       1st pfsync @ /usr/src/sys/netpfil/pf/if_pfsync.c:1402
       2nd pfsync @ /usr/src/sys/netpfil/pf/if_pfsync.c:1429
  
  It's perfectly okay to grab both the main pfsync lock and a bucket lock at the
  same time.
  
  We don't need different names for each bucket lock, because we should always
  only acquire a single one of those at a time.

Modified:
  stable/12/sys/netpfil/pf/if_pfsync.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/netpfil/pf/if_pfsync.c
==============================================================================
--- stable/12/sys/netpfil/pf/if_pfsync.c	Sat Mar 23 07:07:41 2019	(r345439)
+++ stable/12/sys/netpfil/pf/if_pfsync.c	Sat Mar 23 07:07:44 2019	(r345440)
@@ -363,7 +363,7 @@ pfsync_clone_create(struct if_clone *ifc, int unit, ca
 	    M_PFSYNC, M_ZERO | M_WAITOK);
 	for (c = 0; c < pfsync_buckets; c++) {
 		b = &sc->sc_buckets[c];
-		mtx_init(&b->b_mtx, pfsyncname, NULL, MTX_DEF);
+		mtx_init(&b->b_mtx, "pfsync bucket", NULL, MTX_DEF);
 
 		b->b_id = c;
 		b->b_sc = sc;



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