summaryrefslogtreecommitdiff
path: root/net/sched/sch_sfq.c
diff options
context:
space:
mode:
authorWANG Cong <xiyou.wangcong@gmail.com>2015-07-14 21:21:57 +0300
committerDavid S. Miller <davem@davemloft.net>2015-07-16 07:36:34 +0300
commite8d092aafd9e68c04d7b468e95ff7a617998a796 (patch)
treeacfe1c185e7af00334a03cc684c0ac6f7cfb6dbb /net/sched/sch_sfq.c
parent51f65e3c0d1ba3450372ac519e1bceb04c19133c (diff)
downloadlinux-e8d092aafd9e68c04d7b468e95ff7a617998a796.tar.xz
net_sched: fix a use-after-free in sfq
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_sfq.c')
-rw-r--r--net/sched/sch_sfq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c
index 7d1492663360..52f75a5473e1 100644
--- a/net/sched/sch_sfq.c
+++ b/net/sched/sch_sfq.c
@@ -306,10 +306,10 @@ drop:
len = qdisc_pkt_len(skb);
slot->backlog -= len;
sfq_dec(q, x);
- kfree_skb(skb);
sch->q.qlen--;
qdisc_qstats_drop(sch);
qdisc_qstats_backlog_dec(sch, skb);
+ kfree_skb(skb);
return len;
}