Date: Sat, 16 Mar 2019 10:14:03 +0000 (UTC) From: Kristof Provost <kp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345223 - head/sys/netpfil/pf Message-ID: <201903161014.x2GAE3He092681@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kp Date: Sat Mar 16 10:14:03 2019 New Revision: 345223 URL: https://svnweb.freebsd.org/changeset/base/345223 Log: 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. MFC after: 1 week Modified: head/sys/netpfil/pf/if_pfsync.c Modified: head/sys/netpfil/pf/if_pfsync.c ============================================================================== --- head/sys/netpfil/pf/if_pfsync.c Sat Mar 16 06:12:28 2019 (r345222) +++ head/sys/netpfil/pf/if_pfsync.c Sat Mar 16 10:14:03 2019 (r345223) @@ -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?201903161014.x2GAE3He092681>