Date: Tue, 16 Sep 2003 14:33:47 -0700 (PDT) From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 38147 for review Message-ID: <200309162133.h8GLXllN048872@repoman.freebsd.org>
index | next in thread | raw e-mail
http://perforce.freebsd.org/chv.cgi?CH=38147 Change 38147 by sam@sam_ebb on 2003/09/16 14:33:07 o must make mutex recursive due to the tangled path that ICMP packets take o remove bogus Giant assert; we get called from everywhere and cannot assume (for the moment) whether or not Giant is held Affected files ... .. //depot/projects/netperf/sys/netinet/ip_dummynet.c#8 edit Differences ... ==== //depot/projects/netperf/sys/netinet/ip_dummynet.c#8 (text+ko) ==== @@ -165,8 +165,13 @@ #endif static struct mtx dummynet_mtx; +/* + * NB: Recursion is needed to deal with re-entry via ICMP. That is, + * a packet may be dispatched via ip_input from dummynet_io and + * re-enter through ip_output. Yech. + */ #define DUMMYNET_LOCK_INIT() \ - mtx_init(&dummynet_mtx, "dummynet", NULL, MTX_DEF) + mtx_init(&dummynet_mtx, "dummynet", NULL, MTX_DEF | MTX_RECURSE) #define DUMMYNET_LOCK_DESTROY() mtx_destroy(&dummynet_mtx) #define DUMMYNET_LOCK() mtx_lock(&dummynet_mtx) #define DUMMYNET_UNLOCK() mtx_unlock(&dummynet_mtx) @@ -1125,8 +1130,6 @@ is_pipe = (fwa->rule->fw_flg & IP_FW_F_COMMAND) == IP_FW_F_PIPE; #endif - mtx_assert(&Giant, MA_NOTOWNED); - pipe_nr &= 0xffff ; DUMMYNET_LOCK();help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200309162133.h8GLXllN048872>
