diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2008-04-24 11:36:40 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2008-04-24 11:36:40 +0000 |
commit | 7fc8437d1d2dff107fddd1e0381eb8f7e04bacf8 (patch) | |
tree | 67d55d2382c73604930294a8321e82940c22203b /sys/netmpls | |
parent | 70364b8677ceef2632e6dae3fe8ceea29085596d (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/netmpls')
-rw-r--r-- | sys/netmpls/mpls_input.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netmpls/mpls_input.c b/sys/netmpls/mpls_input.c index dd4b6f08c99..9d6c7f71909 100644 --- a/sys/netmpls/mpls_input.c +++ b/sys/netmpls/mpls_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpls_input.c,v 1.3 2008/04/23 12:59:35 dlg Exp $ */ +/* $OpenBSD: mpls_input.c,v 1.4 2008/04/24 11:36:39 dlg Exp $ */ /* * Copyright (c) 2008 Claudio Jeker <claudio@openbsd.org> @@ -49,7 +49,7 @@ mplsintr(void) struct mbuf *m; int s; - while (mplsintrq.ifq_head) { + for (;;) { /* Get next datagram of input queue */ s = splnet(); IF_DEQUEUE(&mplsintrq, m); |