diff options
author | sam <sam@FreeBSD.org> | 2003-10-16 16:21:25 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2003-10-16 16:21:25 +0000 |
commit | aa3ae742c325e5f14f864ae148650f705ca554fb (patch) | |
tree | 71bf398ccab2c064e2b2ed13ec841ce057541d6f /sys | |
parent | bf970aa6cf65ceb1d1ffb43a34f630c4bedebc67 (diff) | |
download | FreeBSD-src-aa3ae742c325e5f14f864ae148650f705ca554fb.zip FreeBSD-src-aa3ae742c325e5f14f864ae148650f705ca554fb.tar.gz |
Drop dummynet lock when calling back into the network stack to deliver
packets. This eliminates a LOR with Giant that caused outbound pipes
to fail.
Supported by: FreeBSD Foundation
Diffstat (limited to 'sys')
-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 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) ) |