mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 16:24:13 +08:00
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);
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user