svn commit: r285943 - stable/10/sys/netpfil/pf

Gleb Smirnoff glebius at FreeBSD.org
Tue Jul 28 09:21:20 UTC 2015


Author: glebius
Date: Tue Jul 28 09:21:19 2015
New Revision: 285943
URL: https://svnweb.freebsd.org/changeset/base/285943

Log:
  Merge r283106:
    During module unload unlock rules before destroying UMA zones, which
    may sleep in uma_drain(). It is safe to unlock here, since we are already
    dehooked from pfil(9) and all pf threads had quit.

Modified:
  stable/10/sys/netpfil/pf/pf_ioctl.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/netpfil/pf/pf_ioctl.c
==============================================================================
--- stable/10/sys/netpfil/pf/pf_ioctl.c	Tue Jul 28 09:19:04 2015	(r285942)
+++ stable/10/sys/netpfil/pf/pf_ioctl.c	Tue Jul 28 09:21:19 2015	(r285943)
@@ -3750,6 +3750,7 @@ pf_unload(void)
 		wakeup_one(pf_purge_thread);
 		rw_sleep(pf_purge_thread, &pf_rules_lock, 0, "pftmo", 0);
 	}
+	PF_RULES_WUNLOCK();
 	pf_normalize_cleanup();
 	pfi_cleanup();
 	pfr_cleanup();
@@ -3757,7 +3758,6 @@ pf_unload(void)
 	pf_cleanup();
 	if (IS_DEFAULT_VNET(curvnet))
 		pf_mtag_cleanup();
-	PF_RULES_WUNLOCK();
 	destroy_dev(pf_dev);
 	rw_destroy(&pf_rules_lock);
 	sx_destroy(&pf_ioctl_lock);


More information about the svn-src-stable-10 mailing list