summaryrefslogtreecommitdiff
path: root/sys/net/bpf.c
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2017-04-20 14:13:01 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2017-04-20 14:13:01 +0000
commita286e01bcdb694af72cc68023f8b8fe54cb7265b (patch)
tree700efd869ef7cca1e0b59b9a9310acbe988c288b /sys/net/bpf.c
parentda85a125dd7fd9af53b0919887129daaf4fa53bb (diff)
Tweak lock inits to make the system runnable with witness(4)
on amd64 and i386.
Diffstat (limited to 'sys/net/bpf.c')
-rw-r--r--sys/net/bpf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index c0bd4672ee3..f71eff16e3c 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bpf.c,v 1.160 2017/01/24 22:40:55 mpi Exp $ */
+/* $OpenBSD: bpf.c,v 1.161 2017/04/20 14:13:00 visa Exp $ */
/* $NetBSD: bpf.c,v 1.33 1997/02/21 23:59:35 thorpej Exp $ */
/*
@@ -140,6 +140,8 @@ struct srpl_rc bpf_d_rc = SRPL_RC_INITIALIZER(bpf_d_ref, bpf_d_unref, NULL);
void bpf_insn_dtor(void *, void *);
struct srp_gc bpf_insn_gc = SRP_GC_INITIALIZER(bpf_insn_dtor, NULL);
+struct rwlock bpf_sysctl_lk = RWLOCK_INITIALIZER("bpfsz");
+
int
bpf_movein(struct uio *uio, u_int linktype, struct mbuf **mp,
struct sockaddr *sockp, struct bpf_insn *filter)
@@ -1633,7 +1635,6 @@ int
bpf_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp,
size_t newlen)
{
- static struct rwlock bpf_sysctl_lk = RWLOCK_INITIALIZER("bpfsz");
int flags = RW_INTR;
int error;