Message ID | 1533062586-804-3-git-send-email-amit.pundir@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp5670676ljj; Tue, 31 Jul 2018 11:43:19 -0700 (PDT) X-Google-Smtp-Source: AAOMgpck23EEeELpeu9dH1lyHVXHo4Oxd3t/2tCCsI7znoJUcz83PFnyLNAnli3jmbIia5zgrqfQ X-Received: by 2002:a62:6f87:: with SMTP id k129-v6mr23447151pfc.26.1533062598991; Tue, 31 Jul 2018 11:43:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533062598; cv=none; d=google.com; s=arc-20160816; b=qHRoRh/k43pY2vHPc/9ENVUjzY3E7SVRPHhE1aXSpJFlbPD4lsk2+gQn3T1x+PpbTO M5x7ZW6jzZ6qbhAiS61SxOBU5ohXjEHau38/Dw4lhxbj+OSMNokswBqAhjpmeqaOwqNU 9UDuLsJnhgzeO1BkWPGoJuw1pXI4YWosZuRhwr2QF1PPu68EoDq5xz38fxsl5OTtqLL0 z2D9MrZrumCifyJBUuC1YKawA1u/xS4kiW9JlQGiI3WocAcs47+6U+7OBTnAFQSBxkx0 1A738J0Yi2PL2xzmGTS/OcIuY5zw6Glj/1Dviob4ZLUDYcj5WTwuWVusgVCdmQ2vXLzj kG4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=OFfiREcHsjp/6IFKlkbICB/E53Wjw3/F2BUYvD1fiXQ=; b=VxMm1OXKTCtm5G0nD9jIwJfRS+NUN2m/V2Crsz6w1/2otBqW1QdGn5XjQRhuP1dR+z 52HtWUdxdMI0y08zrI/h0cDpeCrg+yT4FApdUJZGFzizJFbx8k0y+0KsFFphKr1i248I vJ9726Ph+++vGjPOu7+qkCUB0HvAW6cFRmFwy8DGzYvinB9idsDIFvzxnjJfO6WftMLl vc0+qgqU9Jd09chuT6wwzmv1A+P1XzyCaHeoNLraGQxcTtaRedxnWL7dhXwefnvFBokg GL31/ebYa6ryUYCni0B5bFHRYTD093+eTGUOsj0pfuaFhe8rjBgq2G4A6BfODp9G4nN3 wq6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=V9Qg+Zmb; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <stable-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t71-v6si13085197pgd.271.2018.07.31.11.43.18; Tue, 31 Jul 2018 11:43:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=V9Qg+Zmb; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729691AbeGaUYx (ORCPT <rfc822;ruslan.trofymenko@linaro.org> + 13 others); Tue, 31 Jul 2018 16:24:53 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:37274 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729645AbeGaUYx (ORCPT <rfc822;stable@vger.kernel.org>); Tue, 31 Jul 2018 16:24:53 -0400 Received: by mail-pf1-f193.google.com with SMTP id a26-v6so6531419pfo.4 for <stable@vger.kernel.org>; Tue, 31 Jul 2018 11:43:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=OFfiREcHsjp/6IFKlkbICB/E53Wjw3/F2BUYvD1fiXQ=; b=V9Qg+Zmb92EBmZ8WzJK82BqjEv5mg85gYJkfy98BdFzhw0ZQpmQbv4hJr+ypBakp3O vmUwEVfo6X8Q8W1+xh2XM/KA63vWd3Fp3RRrKzC7vxXthvUfyimKHp/Dwp6w2729E+Tr KLfL4JP6yN1OUYlvEz+80+8ZwilLzZh5MmzeA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=OFfiREcHsjp/6IFKlkbICB/E53Wjw3/F2BUYvD1fiXQ=; b=J4NeVIf1AlqfYjxEDmCTb+0Vg7Fk7TbBs+WnWjJZcoXWE15sqJJvTlqW7INIfKm0kK pxGB1FgPDeS63y0VWaCl8iy3KUkm5lrLYN33nc5dwc1d3uadKgMCtfKPWM6B0/xuThmq 13YdKioj0OmEFiz/KHe9wPCY4bpkoytdsM+SyQjYx3gnD7FER0n12chtRch4bj1irYK/ CGqH9Xwv8dOFUhlG+YkUmu++6aikXarILy9mqMW9avLckFVofDCdzFKSyUvwAauLxuKv eNsWKH5n4j42Yca4LFs5z5YdBJ6CeoIpE5QINvgAxrKZAtc8i4z49iOJqAoioqz8afGZ lJbQ== X-Gm-Message-State: AOUpUlFgwxnHoxTsSZ/k5EQD7hgMokO7lo4GLj0nA9QV0dVyxnJsaHde SkLNlfn3lCibtyQWC69CVOI6dA== X-Received: by 2002:a63:d002:: with SMTP id z2-v6mr2651618pgf.262.1533062596600; Tue, 31 Jul 2018 11:43:16 -0700 (PDT) Received: from localhost.localdomain ([106.51.18.123]) by smtp.gmail.com with ESMTPSA id v22-v6sm38486956pfi.60.2018.07.31.11.43.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 31 Jul 2018 11:43:15 -0700 (PDT) From: Amit Pundir <amit.pundir@linaro.org> To: Greg KH <gregkh@linuxfoundation.org>, Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Cc: "David S . Miller" <davem@davemloft.net>, Stable <stable@vger.kernel.org> Subject: [PATCH for-4.4.y 2/5] sch_multiq: fix double free on init failure Date: Wed, 1 Aug 2018 00:13:03 +0530 Message-Id: <1533062586-804-3-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1533062586-804-1-git-send-email-amit.pundir@linaro.org> References: <1533062586-804-1-git-send-email-amit.pundir@linaro.org> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
net/sched: init failure fixes
|
expand
|
diff --git a/net/sched/sch_multiq.c b/net/sched/sch_multiq.c index bcdd54bb101c..e600a7e6e774 100644 --- a/net/sched/sch_multiq.c +++ b/net/sched/sch_multiq.c @@ -269,12 +269,7 @@ static int multiq_init(struct Qdisc *sch, struct nlattr *opt) for (i = 0; i < q->max_bands; i++) q->queues[i] = &noop_qdisc; - err = multiq_tune(sch, opt); - - if (err) - kfree(q->queues); - - return err; + return multiq_tune(sch, opt); } static int multiq_dump(struct Qdisc *sch, struct sk_buff *skb)