From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from youngberry.canonical.com ([91.189.89.112]:48844 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753889AbbH0WMz (ORCPT ); Thu, 27 Aug 2015 18:12:55 -0400 From: Kamal Mostafa To: linux-kernel@vger.kernel.org, stable@vger.kernel.org, kernel-team@lists.ubuntu.com Cc: John Fastabend , Cong Wang , Cong Wang , "David S. Miller" , Kamal Mostafa Subject: [PATCH 3.19.y-ckt 068/130] fq_codel: fix a use-after-free Date: Thu, 27 Aug 2015 15:10:59 -0700 Message-Id: <1440713521-5906-69-git-send-email-kamal@canonical.com> In-Reply-To: <1440713521-5906-1-git-send-email-kamal@canonical.com> References: <1440713521-5906-1-git-send-email-kamal@canonical.com> Sender: stable-owner@vger.kernel.org List-ID: 3.19.8-ckt6 -stable review patch. If anyone has any objections, please let me know. ------------------ From: WANG Cong commit 052cbda41fdc243a8d40cce7ab3a6327b4b2887e upstream. Fixes: 25331d6ce42b ("net: sched: implement qstat helper routines") Cc: John Fastabend Signed-off-by: Cong Wang Signed-off-by: Cong Wang Acked-by: Eric Dumazet Signed-off-by: David S. Miller Signed-off-by: Kamal Mostafa --- net/sched/sch_fq_codel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c index 1e52dec..b61fd84 100644 --- a/net/sched/sch_fq_codel.c +++ b/net/sched/sch_fq_codel.c @@ -162,10 +162,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; } -- 1.9.1