diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2016-11-22 11:56:42 +1100 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2016-11-22 11:56:42 +1100 |
commit | 98d4b10ee61601b236c34587a215cb86e69cf8ba (patch) | |
tree | 43c6e0bb4608288b1e258e92973129582b2c8c75 /net/sched/sch_api.c | |
parent | c7d565fbc846a5e1f0bc6afa4e122943db276a23 (diff) | |
parent | e796f49d826aadb856981c751efc086c6ce11a77 (diff) |
Merge remote-tracking branch 'net-next/master'
Diffstat (limited to 'net/sched/sch_api.c')
-rw-r--r-- | net/sched/sch_api.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index 206dc24add3a..f337f1bdd1d4 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c @@ -960,6 +960,17 @@ static struct Qdisc *qdisc_create(struct net_device *dev, sch->handle = handle; + /* This exist to keep backward compatible with a userspace + * loophole, what allowed userspace to get IFF_NO_QUEUE + * facility on older kernels by setting tx_queue_len=0 (prior + * to qdisc init), and then forgot to reinit tx_queue_len + * before again attaching a qdisc. + */ + if ((dev->priv_flags & IFF_NO_QUEUE) && (dev->tx_queue_len == 0)) { + dev->tx_queue_len = DEFAULT_TX_QUEUE_LEN; + netdev_info(dev, "Caught tx_queue_len zero misconfig\n"); + } + if (!ops->init || (err = ops->init(sch, tca[TCA_OPTIONS])) == 0) { if (qdisc_is_percpu_stats(sch)) { sch->cpu_bstats = |