netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Patch net] net_sched: fix a use-after-free in sfq
@ 2015-07-14 18:21 Cong Wang
  2015-07-14 18:21 ` [Patch net] fq_codel: fix return value of fq_codel_drop() Cong Wang
  2015-07-16  4:36 ` [Patch net] net_sched: fix a use-after-free in sfq David Miller
  0 siblings, 2 replies; 5+ messages in thread
From: Cong Wang @ 2015-07-14 18:21 UTC (permalink / raw)
  To: netdev; +Cc: Cong Wang, John Fastabend, Cong Wang

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>
---
 net/sched/sch_sfq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c
index 7d14926..52f75a5 100644
--- a/net/sched/sch_sfq.c
+++ b/net/sched/sch_sfq.c
@@ -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;
 	}
 
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-07-16  4:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-14 18:21 [Patch net] net_sched: fix a use-after-free in sfq Cong Wang
2015-07-14 18:21 ` [Patch net] fq_codel: fix return value of fq_codel_drop() Cong Wang
2015-07-15  6:27   ` Eric Dumazet
2015-07-16  4:36   ` David Miller
2015-07-16  4:36 ` [Patch net] net_sched: fix a use-after-free in sfq David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).