Skip to content

Commit

Permalink
net_sched: fix a use-after-free in sfq
Browse files Browse the repository at this point in the history
Fixes: 25331d6 ("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>
  • Loading branch information
WANG Cong authored and David S. Miller committed Jul 16, 2015
1 parent 51f65e3 commit e8d092a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/sched/sch_sfq.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,10 +306,10 @@ static unsigned int sfq_drop(struct Qdisc *sch)
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;
}

Expand Down

0 comments on commit e8d092a

Please sign in to comment.