From: David S. Miller Date: Sat, 19 Jul 2008 06:00:11 +0000 (-0700) Subject: pkt_sched: Fix noqueue_qdisc initialization. X-Git-Tag: v2.6.27-rc1~969^2~24 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=30ee42be00b7a50929a73cb617f70b1d3219eb69;p=linux-2.6-omap-h63xx.git pkt_sched: Fix noqueue_qdisc initialization. Like noop_qdisc, it needs a dummy backpointer and explicit qdisc->q.lock initialization. Based upon a report by Stephen Hemminger. Signed-off-by: David S. Miller --- diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index 14cc443d049..522a41a9f90 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c @@ -340,12 +340,19 @@ static struct Qdisc_ops noqueue_qdisc_ops __read_mostly = { .owner = THIS_MODULE, }; +static struct Qdisc noqueue_qdisc; +static struct netdev_queue noqueue_netdev_queue = { + .qdisc = &noqueue_qdisc, +}; + static struct Qdisc noqueue_qdisc = { .enqueue = NULL, .dequeue = noop_dequeue, .flags = TCQ_F_BUILTIN, .ops = &noqueue_qdisc_ops, .list = LIST_HEAD_INIT(noqueue_qdisc.list), + .q.lock = __SPIN_LOCK_UNLOCKED(noqueue_qdisc.q.lock), + .dev_queue = &noqueue_netdev_queue, };