From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from youngberry.canonical.com ([91.189.89.112]:48759 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753521AbbH0WMr (ORCPT ); Thu, 27 Aug 2015 18:12:47 -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 052/130] net_sched: fix a use-after-free in sfq Date: Thu, 27 Aug 2015 15:10:43 -0700 Message-Id: <1440713521-5906-53-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 e8d092aafd9e68c04d7b468e95ff7a617998a796 upstream. Fixes: 25331d6ce42b ("net: sched: implement qstat helper routines") Cc: John Fastabend Signed-off-by: Cong Wang Signed-off-by: Cong Wang Signed-off-by: David S. Miller Signed-off-by: Kamal Mostafa --- 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 b877140..0f65ba4 100644 --- a/net/sched/sch_sfq.c +++ b/net/sched/sch_sfq.c @@ -329,10 +329,10 @@ drop: 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.9.1