diff options
author | andre <andre@FreeBSD.org> | 2004-08-19 23:31:40 +0000 |
---|---|---|
committer | andre <andre@FreeBSD.org> | 2004-08-19 23:31:40 +0000 |
commit | 5947fa055f90e0672e977ff67865c0e1ee8150b7 (patch) | |
tree | d7edcaaf516b864eaa6b4c28e72a9d53d5746373 /sys/netinet/ip_fw2.c | |
parent | 754abea798fde6cb924de5a9adddad3c023ccbbd (diff) | |
download | FreeBSD-src-5947fa055f90e0672e977ff67865c0e1ee8150b7.zip FreeBSD-src-5947fa055f90e0672e977ff67865c0e1ee8150b7.tar.gz |
When unloading ipfw module use callout_drain() to make absolutely sure that
all callouts are stopped and finished. Move it before IPFW_LOCK() to avoid
deadlocking when draining callouts.
Diffstat (limited to 'sys/netinet/ip_fw2.c')
-rw-r--r-- | sys/netinet/ip_fw2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/ip_fw2.c b/sys/netinet/ip_fw2.c index 2737611..5b9b965 100644 --- a/sys/netinet/ip_fw2.c +++ b/sys/netinet/ip_fw2.c @@ -3421,8 +3421,8 @@ ipfw_destroy(void) ip_fw_chk_ptr = NULL; ip_fw_ctl_ptr = NULL; + callout_drain(&ipfw_timeout); IPFW_LOCK(&layer3_chain); - callout_stop(&ipfw_timeout); layer3_chain.reap = NULL; free_chain(&layer3_chain, 1 /* kill default rule */); reap = layer3_chain.reap, layer3_chain.reap = NULL; |