]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit09bfdbdaa74def4655e86e03118df0cf6657e476
treef27b438ff9fccfae7fe7c85baf0763663f5b9569
parent3877e68d67e850194bfa53e7f015113326af99f3
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: c09d3fe056667 ("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