[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1448979011.25582.21.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Tue, 01 Dec 2015 06:10:11 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: Daniele Fucini <dfucini@...il.com>
Cc: Cong Wang <cwang@...pensource.com>,
netdev <netdev@...r.kernel.org>,
Jamal Hadi Salim <jhs@...atatu.com>,
David Miller <davem@...emloft.net>, spender@...ecurity.net,
pageexec@...email.hu, re.emese@...il.com
Subject: Re: size overflow in function qdisc_tree_decrease_qlen
net/sched/sch_api.c
On Tue, 2015-12-01 at 06:06 -0800, Eric Dumazet wrote:
> On Tue, 2015-12-01 at 12:19 +0100, Daniele Fucini wrote:
> > Thanks for the reply. Here's the output of `tc qdisc show`:
> > https://gist.github.com/1847102c8fe08f63e9e7
> Hmm... I do not think we ever took care of MQ in
> qdisc_tree_decrease_qlen()
This looks like a false positive, because MQ recomputes backlog/qlen at
the time (stats) dumps are requested.
I would say there is no bug.
static int mq_dump(struct Qdisc *sch, struct sk_buff *skb)
{
struct net_device *dev = qdisc_dev(sch);
struct Qdisc *qdisc;
unsigned int ntx;
sch->q.qlen = 0;
memset(&sch->bstats, 0, sizeof(sch->bstats));
memset(&sch->qstats, 0, sizeof(sch->qstats));
for (ntx = 0; ntx < dev->num_tx_queues; ntx++) {
qdisc = netdev_get_tx_queue(dev, ntx)->qdisc_sleeping;
spin_lock_bh(qdisc_lock(qdisc));
sch->q.qlen += qdisc->q.qlen;
sch->bstats.bytes += qdisc->bstats.bytes;
sch->bstats.packets += qdisc->bstats.packets;
sch->qstats.backlog += qdisc->qstats.backlog;
sch->qstats.drops += qdisc->qstats.drops;
sch->qstats.requeues += qdisc->qstats.requeues;
sch->qstats.overlimits += qdisc->qstats.overlimits;
spin_unlock_bh(qdisc_lock(qdisc));
}
return 0;
}
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists