Date: Wed, 24 Dec 2003 10:31:18 -0800 (PST) From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 44281 for review Message-ID: <200312241831.hBOIVIsn018785@repoman.freebsd.org>
index | next in thread | raw e-mail
http://perforce.freebsd.org/chv.cgi?CH=44281 Change 44281 by sam@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,help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200312241831.hBOIVIsn018785>
