diff options
author | sam <sam@FreeBSD.org> | 2003-09-17 22:06:47 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2003-09-17 22:06:47 +0000 |
commit | 8e2cce2cfe9c258058e4f193aa6cb50e389a0c1a (patch) | |
tree | fc10b4bebb4efcdec7f53569c63d2dc60ab44609 /sys/netinet/ip_fw2.c | |
parent | 5eeea54c4e794906c468fe5c829dbc63c6243991 (diff) | |
download | FreeBSD-src-8e2cce2cfe9c258058e4f193aa6cb50e389a0c1a.zip FreeBSD-src-8e2cce2cfe9c258058e4f193aa6cb50e389a0c1a.tar.gz |
Bandaid locking change: mark static rule mutex recursive so re-entry when
sending an ICMP packet doesn't cause a panic. A better solution is needed;
possibly defering the transmit to a dedicated thread.
Observed by: "Aaron Wohl" <freebsd@soith.com>
Diffstat (limited to 'sys/netinet/ip_fw2.c')
-rw-r--r-- | sys/netinet/ip_fw2.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet/ip_fw2.c b/sys/netinet/ip_fw2.c index cf314be..0d3da1b 100644 --- a/sys/netinet/ip_fw2.c +++ b/sys/netinet/ip_fw2.c @@ -111,7 +111,8 @@ struct ip_fw_chain { struct mtx mtx; /* lock guarding rule list */ }; #define IPFW_LOCK_INIT(_chain) \ - mtx_init(&(_chain)->mtx, "IPFW static rules", NULL, MTX_DEF) + mtx_init(&(_chain)->mtx, "IPFW static rules", NULL, \ + MTX_DEF | MTX_RECURSE) #define IPFW_LOCK_DESTROY(_chain) mtx_destroy(&(_chain)->mtx) #define IPFW_LOCK(_chain) mtx_lock(&(_chain)->mtx) #define IPFW_UNLOCK(_chain) mtx_unlock(&(_chain)->mtx) |