summaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorWANG Cong <xiyou.wangcong@gmail.com>2015-07-14 20:21:57 +0200
committerDavid S. Miller <davem@davemloft.net>2015-07-16 06:36:34 +0200
commite8d092aafd9e68c04d7b468e95ff7a617998a796 (patch)
treeacfe1c185e7af00334a03cc684c0ac6f7cfb6dbb /net/sched
parentMerge branch 'ipvlan' (diff)
downloadlinux-e8d092aafd9e68c04d7b468e95ff7a617998a796.tar.xz
linux-e8d092aafd9e68c04d7b468e95ff7a617998a796.zip
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')
-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;
}