diff options
author | WANG Cong <xiyou.wangcong@gmail.com> | 2015-07-13 21:30:07 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-07-16 02:18:21 +0200 |
commit | 052cbda41fdc243a8d40cce7ab3a6327b4b2887e (patch) | |
tree | 23885ad8db6893cf355a2b9d897a89643d508105 /net/sched/sch_fq_codel.c | |
parent | tcp: don't use F-RTO on non-recurring timeouts (diff) | |
download | linux-052cbda41fdc243a8d40cce7ab3a6327b4b2887e.tar.xz linux-052cbda41fdc243a8d40cce7ab3a6327b4b2887e.zip |
fq_codel: fix a use-after-free
Fixes: 25331d6ce42b ("net: sched: implement qstat helper routines")
Cc: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Cong Wang <cwang@twopensource.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_fq_codel.c')
-rw-r--r-- | net/sched/sch_fq_codel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c index d75993f89fac..06e7c845e24d 100644 --- a/net/sched/sch_fq_codel.c +++ b/net/sched/sch_fq_codel.c @@ -155,10 +155,10 @@ static unsigned int fq_codel_drop(struct Qdisc *sch) skb = dequeue_head(flow); len = qdisc_pkt_len(skb); q->backlogs[idx] -= len; - kfree_skb(skb); sch->q.qlen--; qdisc_qstats_drop(sch); qdisc_qstats_backlog_dec(sch, skb); + kfree_skb(skb); flow->dropped++; return idx; } |