summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/netinet/ip_dummynet.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/netinet/ip_dummynet.c b/sys/netinet/ip_dummynet.c
index 23497b6..7353865 100644
--- a/sys/netinet/ip_dummynet.c
+++ b/sys/netinet/ip_dummynet.c
@@ -429,6 +429,8 @@ transmit_event(struct dn_pipe *pipe)
{
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 @@ transmit_event(struct dn_pipe *pipe)
*/
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 @@ transmit_event(struct dn_pipe *pipe)
break ;
}
free(pkt, M_DUMMYNET);
+ DUMMYNET_LOCK();
}
/* if there are leftover packets, put into the heap for next event */
if ( (pkt = pipe->head) )
OpenPOWER on IntegriCloud