Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 052cbda4 authored by WANG Cong's avatar WANG Cong Committed by David S. Miller
Browse files

fq_codel: fix a use-after-free



Fixes: 25331d6c ("net: sched: implement qstat helper routines")
Cc: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: default avatarCong Wang <cwang@twopensource.com>
Acked-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f82b681a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
}