Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F156816973
D10025.id27994.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D10025.id27994.diff
View Options
Index: head/sys/netpfil/pf/pf_ioctl.c
===================================================================
--- head/sys/netpfil/pf/pf_ioctl.c
+++ head/sys/netpfil/pf/pf_ioctl.c
@@ -178,7 +178,7 @@
static int dehook_pf(void);
static int shutdown_pf(void);
static int pf_load(void);
-static int pf_unload(void);
+static void pf_unload(void);
static struct cdevsw pf_cdevsw = {
.d_ioctl = pfioctl,
@@ -3789,10 +3789,9 @@
pf_mtag_cleanup();
}
-static int
+static void
pf_unload(void)
{
- int error = 0;
sx_xlock(&pf_end_lock);
pf_end_threads = 1;
@@ -3810,8 +3809,6 @@
rw_destroy(&pf_rules_lock);
sx_destroy(&pf_ioctl_lock);
sx_destroy(&pf_end_lock);
-
- return (error);
}
static void
@@ -3829,6 +3826,7 @@
pf_unload_vnet();
}
+SYSUNINIT(pf_unload, SI_SUB_PROTO_FIREWALL, SI_ORDER_SECOND, pf_unload, NULL);
VNET_SYSUNINIT(vnet_pf_uninit, SI_SUB_PROTO_FIREWALL, SI_ORDER_THIRD,
vnet_pf_uninit, NULL);
@@ -3849,7 +3847,8 @@
error = EBUSY;
break;
case MOD_UNLOAD:
- error = pf_unload();
+ /* Handled in SYSUNINIT(pf_unload) to ensure it's done after
+ * the vnet_pf_uninit()s */
break;
default:
error = EINVAL;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, May 17, 4:05 PM (1 m, 33 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33197818
Default Alt Text
D10025.id27994.diff (1 KB)
Attached To
Mode
D10025: pf: Fix panic on unload
Attached
Detach File
Event Timeline
Log In to Comment