diff options
author | 2020-12-15 15:23:48 +0000 | |
---|---|---|
committer | 2020-12-15 15:23:48 +0000 | |
commit | 5755d6a3cd68facb3624cffc3c4d99c92ebaad8d (patch) | |
tree | b60b73f2cd74d490f1a32da56cd4d521165bd288 | |
parent | Avoid NULL dereference after returning from copy(). (diff) | |
download | wireguard-openbsd-5755d6a3cd68facb3624cffc3c4d99c92ebaad8d.tar.xz wireguard-openbsd-5755d6a3cd68facb3624cffc3c4d99c92ebaad8d.zip |
missing NET_LOCK()/NET_UNLOCK() in pf_osfp_flush()
OK mpi@
-rw-r--r-- | sys/net/pf_osfp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/pf_osfp.c b/sys/net/pf_osfp.c index 87dee95e5d0..a7f60e2e3c2 100644 --- a/sys/net/pf_osfp.c +++ b/sys/net/pf_osfp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_osfp.c,v 1.44 2020/10/21 16:15:32 kettenis Exp $ */ +/* $OpenBSD: pf_osfp.c,v 1.45 2020/12/15 15:23:48 sashan Exp $ */ /* * Copyright (c) 2003 Mike Frantzen <frantzen@w4g.org> @@ -312,6 +312,7 @@ pf_osfp_flush(void) struct pf_os_fingerprint *fp; struct pf_osfp_entry *entry; + NET_LOCK(); PF_LOCK(); while ((fp = SLIST_FIRST(&pf_osfp_list))) { SLIST_REMOVE_HEAD(&pf_osfp_list, fp_next); @@ -322,6 +323,7 @@ pf_osfp_flush(void) pool_put(&pf_osfp_pl, fp); } PF_UNLOCK(); + NET_UNLOCK(); } |