qdisc_root_lock() is only %100 safe to use when the RTNL
semaphore is held.
Signed-off-by: David S. Miller <davem@davemloft.net>
} else {
struct netdev_queue *txq;
spinlock_t *root_lock;
} else {
struct netdev_queue *txq;
spinlock_t *root_lock;
txq = netdev_get_tx_queue(local->mdev, agg_queue);
txq = netdev_get_tx_queue(local->mdev, agg_queue);
- root_lock = qdisc_root_lock(txq->qdisc);
+ q = rcu_dereference(txq->qdisc);
+ root_lock = qdisc_lock(q);
- qdisc_reset(txq->qdisc);
spin_unlock_bh(root_lock);
}
}
spin_unlock_bh(root_lock);
}
}