diff options
author | WANG Cong <xiyou.wangcong@gmail.com> | 2015-07-13 12:30:07 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-09-29 19:26:22 +0200 |
commit | 3e71447b891943cfaf8e5be7bd638c0414b3fea8 (patch) | |
tree | d1c12236bf987895dbc41299be12ff30f3479468 | |
parent | 1b8976fedaf00e6e06ebe850aa4c8602d55282c3 (diff) |
fq_codel: fix a use-after-free
[ Upstream commit 052cbda41fdc243a8d40cce7ab3a6327b4b2887e ]
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-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 c244c45b78d7..9291598b5aad 100644 --- a/net/sched/sch_fq_codel.c +++ b/net/sched/sch_fq_codel.c @@ -162,10 +162,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; } |