PERFORCE change 44281 for review
Sam Leffler
sam at FreeBSD.org
Wed Dec 24 10:31:21 PST 2003
http://perforce.freebsd.org/chv.cgi?CH=44281
Change 44281 by sam at sam_ebb on 2003/12/24 10:31:15
bandaid LOR between IPFW and inpcb head
Affected files ...
.. //depot/projects/netperf+sockets/sys/netinet/ip_fw2.c#4 edit
Differences ...
==== //depot/projects/netperf+sockets/sys/netinet/ip_fw2.c#4 (text+ko) ====
@@ -1296,7 +1296,8 @@
}
static int
-check_uidgid(ipfw_insn_u32 *insn,
+check_uidgid(struct ip_fw_chain *chain,
+ ipfw_insn_u32 *insn,
int proto, struct ifnet *oif,
struct in_addr dst_ip, u_int16_t dst_port,
struct in_addr src_ip, u_int16_t src_port)
@@ -1317,7 +1318,10 @@
match = 0;
- INP_INFO_RLOCK(pi); /* XXX LOR with IPFW */
+ /* NB: reorder to avoid LOR between IPFW and inp */
+ IPFW_UNLOCK(chain);
+ INP_INFO_RLOCK(pi);
+ IPFW_LOCK(chain);
pcb = (oif) ?
in_pcblookup_hash(pi,
dst_ip, htons(dst_port),
@@ -1657,7 +1661,7 @@
break;
if (proto == IPPROTO_TCP ||
proto == IPPROTO_UDP)
- match = check_uidgid(
+ match = check_uidgid(chain,
(ipfw_insn_u32 *)cmd,
proto, oif,
dst_ip, dst_port,
More information about the p4-projects
mailing list