Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Nov 2018 16:53:15 +0000 (UTC)
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r340067 - head/sys/netpfil/pf
Message-ID:  <201811021653.wA2GrF2D029727@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kp
Date: Fri Nov  2 16:53:15 2018
New Revision: 340067
URL: https://svnweb.freebsd.org/changeset/base/340067

Log:
  pfsync: Ensure uninit is done before pf
  
  pfsync touches pf memory (for pf_state and the pfsync callback
  pointers), not the other way around. We need to ensure that pfsync is
  torn down before pf.
  
  MFC after:	2 weeks
  Sponsored by:	Orange Business Services
  Differential Revision:	https://reviews.freebsd.org/D17501

Modified:
  head/sys/netpfil/pf/if_pfsync.c

Modified: head/sys/netpfil/pf/if_pfsync.c
==============================================================================
--- head/sys/netpfil/pf/if_pfsync.c	Fri Nov  2 16:50:17 2018	(r340066)
+++ head/sys/netpfil/pf/if_pfsync.c	Fri Nov  2 16:53:15 2018	(r340067)
@@ -2362,11 +2362,8 @@ vnet_pfsync_uninit(const void *unused __unused)
 	if_clone_detach(V_pfsync_cloner);
 	swi_remove(V_pfsync_swi_cookie);
 }
-/*
- * Detach after pf is gone; otherwise we might touch pfsync memory
- * from within pf after freeing pfsync.
- */
-VNET_SYSUNINIT(vnet_pfsync_uninit, SI_SUB_INIT_IF, SI_ORDER_SECOND,
+
+VNET_SYSUNINIT(vnet_pfsync_uninit, SI_SUB_PROTO_FIREWALL, SI_ORDER_FOURTH,
     vnet_pfsync_uninit, NULL);
 
 static int



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201811021653.wA2GrF2D029727>