Date: Wed, 15 Oct 2003 20:43:41 -0700 (PDT) From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 39765 for review Message-ID: <200310160343.h9G3hfgi037459@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=39765 Change 39765 by sam@sam_ebb on 2003/10/15 20:43:00 Workaround a LOR between Giant and the dummynet lock by dropping the dummynet lock each time we re-enter the network stack. This can be removed when the stack no longer depends on Giant. Affected files ... .. //depot/projects/netperf/sys/netinet/ip_dummynet.c#10 edit Differences ... ==== //depot/projects/netperf/sys/netinet/ip_dummynet.c#10 (text+ko) ==== @@ -429,6 +429,8 @@ { struct dn_pkt *pkt ; + DUMMYNET_LOCK_ASSERT(); + while ( (pkt = pipe->head) && DN_KEY_LEQ(pkt->output_time, curr_time) ) { /* * first unlink, then call procedures, since ip_input() can invoke @@ -436,6 +438,8 @@ */ pipe->head = DN_NEXT(pkt) ; + /* XXX: drop the lock for now to avoid LOR's */ + DUMMYNET_UNLOCK(); /* * The actual mbuf is preceded by a struct dn_pkt, resembling an mbuf * (NOT A REAL one, just a small block of malloc'ed memory) with @@ -496,6 +500,7 @@ break ; } free(pkt, M_DUMMYNET); + DUMMYNET_LOCK(); } /* if there are leftover packets, put into the heap for next event */ if ( (pkt = pipe->head) )
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200310160343.h9G3hfgi037459>