Date: Sat, 23 Mar 2019 07:07:42 +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-11@freebsd.org Subject: svn commit: r345439 - stable/11/sys/netpfil/pf Message-ID: <201903230707.x2N77gtc083742@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kp Date: Sat Mar 23 07:07:41 2019 New Revision: 345439 URL: https://svnweb.freebsd.org/changeset/base/345439 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/11/sys/netpfil/pf/if_pfsync.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/netpfil/pf/if_pfsync.c ============================================================================== --- stable/11/sys/netpfil/pf/if_pfsync.c Sat Mar 23 05:13:51 2019 (r345438) +++ stable/11/sys/netpfil/pf/if_pfsync.c Sat Mar 23 07:07:41 2019 (r345439) @@ -361,7 +361,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.x2N77gtc083742>