NET_SCHED: Fix ingress qdisc locking.
authorPatrick McHardy <kaber@trash.net>
Tue, 27 Mar 2007 01:15:37 +0000 (18:15 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 6 Apr 2007 10:43:13 +0000 (03:43 -0700)
[NET_SCHED]: Fix ingress locking

Ingress queueing uses a seperate lock for serializing enqueue operations,
but fails to properly protect itself against concurrent changes to the
qdisc tree. Use queue_lock for now since the real fix it quite intrusive.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c

index e660cb57e42a0d1221d6c8ee5ba452f8ce9593c9..295f8f9d22dfcbc4bcc0fe1287ac740c2a386d4c 100644 (file)
@@ -1750,10 +1750,10 @@ static int ing_filter(struct sk_buff *skb)
 
                skb->tc_verd = SET_TC_AT(skb->tc_verd,AT_INGRESS);
 
-               spin_lock(&dev->ingress_lock);
+               spin_lock(&dev->queue_lock);
                if ((q = dev->qdisc_ingress) != NULL)
                        result = q->enqueue(skb, q);
-               spin_unlock(&dev->ingress_lock);
+               spin_unlock(&dev->queue_lock);
 
        }