Now that packets are queued the recursion is gone and we can keep
the lock.

ok?

Index: net/pf.c
===================================================================
RCS file: /cvs/src/sys/net/pf.c,v
retrieving revision 1.1030
diff -u -p -r1.1030 pf.c
--- net/pf.c    28 May 2017 16:55:54 -0000      1.1030
+++ net/pf.c    29 May 2017 12:31:01 -0000
@@ -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);

Reply via email to