pkt_sched: move the sanity test in qdisc_list_add()
authorEric Dumazet <edumazet@google.com>
Sat, 8 Mar 2014 16:01:19 +0000 (08:01 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 10 Mar 2014 19:44:21 +0000 (15:44 -0400)
commit37314363cd65d19c71bea5f222e5108c93dc3c78
treef27b438ff9fccfae7fe7c85baf0763663f5b9569
parent92f092d16c5ff6e71d8e7761e4c9193375d3c994
pkt_sched: move the sanity test in qdisc_list_add()

The WARN_ON(root == &noop_qdisc)) added in qdisc_list_add()
can trigger in normal conditions when devices are not up.
It should be done only right before the list_add_tail() call.

Fixes: e57a784d8cae4 ("pkt_sched: set root qdisc before change() in attach_default_qdiscs()")
Reported-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
Tested-by: Mirco Tischler <mt-ml@gmx.de>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_api.c