* Patch "net_sched: fix pfifo_head_drop behavior vs backlog" has been added to the 4.6-stable tree
@ 2016-07-06 23:56 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2016-07-06 23:56 UTC (permalink / raw)
To: edumazet, davem, gregkh, jhs, xiyou.wangcong; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
net_sched: fix pfifo_head_drop behavior vs backlog
to the 4.6-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
net_sched-fix-pfifo_head_drop-behavior-vs-backlog.patch
and it can be found in the queue-4.6 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From foo@baz Wed Jul 6 16:50:56 PDT 2016
From: Eric Dumazet <edumazet@google.com>
Date: Sun, 12 Jun 2016 20:01:25 -0700
Subject: net_sched: fix pfifo_head_drop behavior vs backlog
From: Eric Dumazet <edumazet@google.com>
[ Upstream commit 6c0d54f1897d229748d4f41ef919078db6db2123 ]
When the qdisc is full, we drop a packet at the head of the queue,
queue the current skb and return NET_XMIT_CN
Now we track backlog on upper qdiscs, we need to call
qdisc_tree_reduce_backlog(), even if the qlen did not change.
Fixes: 2ccccf5fb43f ("net_sched: update hierarchical backlog too")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: WANG Cong <xiyou.wangcong@gmail.com>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/sched/sch_fifo.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/net/sched/sch_fifo.c
+++ b/net/sched/sch_fifo.c
@@ -37,14 +37,18 @@ static int pfifo_enqueue(struct sk_buff
static int pfifo_tail_enqueue(struct sk_buff *skb, struct Qdisc *sch)
{
+ unsigned int prev_backlog;
+
if (likely(skb_queue_len(&sch->q) < sch->limit))
return qdisc_enqueue_tail(skb, sch);
+ prev_backlog = sch->qstats.backlog;
/* queue full, remove one skb to fulfill the limit */
__qdisc_queue_drop_head(sch, &sch->q);
qdisc_qstats_drop(sch);
qdisc_enqueue_tail(skb, sch);
+ qdisc_tree_reduce_backlog(sch, 0, prev_backlog - sch->qstats.backlog);
return NET_XMIT_CN;
}
Patches currently in stable-queue which might be from edumazet@google.com are
queue-4.6/netem-fix-a-use-after-free.patch
queue-4.6/net_sched-fix-pfifo_head_drop-behavior-vs-backlog.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-07-06 23:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-06 23:56 Patch "net_sched: fix pfifo_head_drop behavior vs backlog" has been added to the 4.6-stable tree gregkh
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.