• P
    net_sched: fix estimator lock selection for mq child qdiscs · 23bcf634
    Patrick McHardy 提交于
    When new child qdiscs are attached to the mq qdisc, they are actually
    attached as root qdiscs to the device queues. The lock selection for
    new estimators incorrectly picks the root lock of the existing and
    to be replaced qdisc, which results in a use-after-free once the old
    qdisc has been destroyed.
    
    Mark mq qdisc instances with a new flag and treat qdiscs attached to
    mq as children similar to regular root qdiscs.
    
    Additionally prevent estimators from being attached to the mq qdisc
    itself since it only updates its byte and packet counters during dumps.
    Signed-off-by: NPatrick McHardy <kaber@trash.net>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    23bcf634
sch_api.c 39.2 KB