diff options
| author | Sam Leffler <sam@FreeBSD.org> | 2003-10-16 16:21:25 +0000 |
|---|---|---|
| committer | Sam Leffler <sam@FreeBSD.org> | 2003-10-16 16:21:25 +0000 |
| commit | b15694110fd3cd4faf6ba44f776969819a492471 (patch) | |
| tree | 71bf398ccab2c064e2b2ed13ec841ce057541d6f /sys/netinet | |
| parent | ea0452102008167cec32861b232065a4951fd993 (diff) | |
Notes
Diffstat (limited to 'sys/netinet')
| -rw-r--r-- | sys/netinet/ip_dummynet.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/netinet/ip_dummynet.c b/sys/netinet/ip_dummynet.c index 23497b6f1051..73538650d7f3 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) ) |
