fq_codel: fix a use-after-free
Fixes: 25331d6ce4
("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>
This commit is contained in:
parent
f82b681a51
commit
052cbda41f
@ -155,10 +155,10 @@ static unsigned int fq_codel_drop(struct Qdisc *sch)
|
|||||||
skb = dequeue_head(flow);
|
skb = dequeue_head(flow);
|
||||||
len = qdisc_pkt_len(skb);
|
len = qdisc_pkt_len(skb);
|
||||||
q->backlogs[idx] -= len;
|
q->backlogs[idx] -= len;
|
||||||
kfree_skb(skb);
|
|
||||||
sch->q.qlen--;
|
sch->q.qlen--;
|
||||||
qdisc_qstats_drop(sch);
|
qdisc_qstats_drop(sch);
|
||||||
qdisc_qstats_backlog_dec(sch, skb);
|
qdisc_qstats_backlog_dec(sch, skb);
|
||||||
|
kfree_skb(skb);
|
||||||
flow->dropped++;
|
flow->dropped++;
|
||||||
return idx;
|
return idx;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user