svn commit: r237169 - projects/pf/head/sys/contrib/pf/net

Gleb Smirnoff glebius at FreeBSD.org
Sat Jun 16 19:05:39 UTC 2012


Author: glebius
Date: Sat Jun 16 19:05:38 2012
New Revision: 237169
URL: http://svn.freebsd.org/changeset/base/237169

Log:
  Re-do second part of r236718. The pfsync thread don't obtain any
  hash locks, but can dereference state keys. Thus, we need to remove
  state from pfsync queues prior to detaching keys.

Modified:
  projects/pf/head/sys/contrib/pf/net/pf.c

Modified: projects/pf/head/sys/contrib/pf/net/pf.c
==============================================================================
--- projects/pf/head/sys/contrib/pf/net/pf.c	Sat Jun 16 18:56:19 2012	(r237168)
+++ projects/pf/head/sys/contrib/pf/net/pf.c	Sat Jun 16 19:05:38 2012	(r237169)
@@ -1477,12 +1477,12 @@ pf_unlink_state(struct pf_state *s, u_in
 	pf_src_tree_remove_state(s);
 	PF_HASHROW_UNLOCK(ih);
 
-	pf_detach_state(s);
-	refcount_release(&s->refs);
-
 	if (pfsync_delete_state_ptr != NULL)
 		pfsync_delete_state_ptr(s);
 
+	pf_detach_state(s);
+	refcount_release(&s->refs);
+
 	return (pf_release_state(s));
 }
 


More information about the svn-src-projects mailing list