summaryrefslogtreecommitdiff
path: root/sys/net/if_bridge.c
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2008-04-24 11:36:40 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2008-04-24 11:36:40 +0000
commit7fc8437d1d2dff107fddd1e0381eb8f7e04bacf8 (patch)
tree67d55d2382c73604930294a8321e82940c22203b /sys/net/if_bridge.c
parent70364b8677ceef2632e6dae3fe8ceea29085596d (diff)
the softnet intr handlers check if the input queue has packets on
it by reading the queues head pointer. if that pointer is not null then it takes splnet and dequeues a packet for handling. this is bad because the ifqueue head is modified at splnet and the sofnet handlers read it without holding splnet. this removes that check of the head pointer and simply checks if the dequeue gave us a packet or not before proceeding. found while reading mpls code. discussed with norby@ and henning@ ok mcbride@ henning@
Diffstat (limited to 'sys/net/if_bridge.c')
-rw-r--r--sys/net/if_bridge.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c
index 913965ea0c9..1ab9e440f26 100644
--- a/sys/net/if_bridge.c
+++ b/sys/net/if_bridge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bridge.c,v 1.166 2007/12/20 02:53:02 brad Exp $ */
+/* $OpenBSD: if_bridge.c,v 1.167 2008/04/24 11:36:38 dlg Exp $ */
/*
* Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net)
@@ -1170,7 +1170,7 @@ bridgeintr(void)
int s;
LIST_FOREACH(sc, &bridge_list, sc_list) {
- while (sc->sc_if.if_snd.ifq_head) {
+ for (;;) {
s = splnet();
IF_DEQUEUE(&sc->sc_if.if_snd, m);
splx(s);