From: Eric Dumazet <eric.duma...@gmail.com> Date: Tue, 01 Dec 2015 20:08:51 -0800
> From: Eric Dumazet <eduma...@google.com> > > qdisc_tree_decrease_qlen() suffers from two problems on multiqueue > devices. > > One problem is that it updates sch->q.qlen and sch->qstats.drops > on the mq/mqprio root qdisc, while it should not : Daniele > reported underflows errors : ... > mq/mqprio have their own ways to report qlen/drops by folding stats on > all their queues, with appropriate locking. > > A second problem is that qdisc_tree_decrease_qlen() calls qdisc_lookup() > without proper locking : concurrent qdisc updates could corrupt the list > that qdisc_match_from_root() parses to find a qdisc given its handle. > > Fix first problem adding a TCQ_F_NOPARENT qdisc flag that > qdisc_tree_decrease_qlen() can use to abort its tree traversal, > as soon as it meets a mq/mqprio qdisc children. > > Second problem can be fixed by RCU protection. > Qdisc are already freed after RCU grace period, so qdisc_list_add() and > qdisc_list_del() simply have to use appropriate rcu list variants. > > A future patch will add a per struct netdev_queue list anchor, so that > qdisc_tree_decrease_qlen() can have more efficient lookups. > > Reported-by: Daniele Fucini <dfuc...@gmail.com> > Signed-off-by: Eric Dumazet <eduma...@google.com> Applied and queued up for -stable, thanks Eric! -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html