export_pflow() is no longer grabbing the NET_LOCK(), so no need to
authormpi <mpi@openbsd.org>
Mon, 29 May 2017 14:18:32 +0000 (14:18 +0000)
committermpi <mpi@openbsd.org>
Mon, 29 May 2017 14:18:32 +0000 (14:18 +0000)
release it beforehand.

ok henning@, benno@

sys/net/pf.c

index a0f3fea..3548260 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: pf.c,v 1.1030 2017/05/28 16:55:54 bluhm Exp $ */
+/*     $OpenBSD: pf.c,v 1.1031 2017/05/29 14:18:32 mpi Exp $ */
 
 /*
  * Copyright (c) 2001 Daniel Hartmeier
@@ -1320,12 +1320,8 @@ pf_remove_state(struct pf_state *cur)
        }
        RB_REMOVE(pf_state_tree_id, &tree_id, cur);
 #if NPFLOW > 0
-       if (cur->state_flags & PFSTATE_PFLOW) {
-               /* XXXSMP breaks atomicity */
-               rw_exit_write(&netlock);
+       if (cur->state_flags & PFSTATE_PFLOW)
                export_pflow(cur);
-               rw_enter_write(&netlock);
-       }
 #endif /* NPFLOW > 0 */
 #if NPFSYNC > 0
        pfsync_delete_state(cur);