Message ID | 1533062405-32524-5-git-send-email-amit.pundir@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp5668344ljj; Tue, 31 Jul 2018 11:40:24 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcuLOjBEaVF0Zpj8aSok3QVewViKv+iv0juBj3lXj+NlNJHLU1WnyQfgXdOT102kaRXsNDM X-Received: by 2002:a17:902:d68f:: with SMTP id v15-v6mr13377145ply.278.1533062424517; Tue, 31 Jul 2018 11:40:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533062424; cv=none; d=google.com; s=arc-20160816; b=gCEy+0DQJme0RnSa7BqIx1qS9dQNx5oq2sfOcjtcxI1S7uybcszIX9oqvw+Gf6Bfbj CXOa62pJBMHYiTgugvNwg6QAFDtOxtoTNbI09KFn29RoeYV8E9ylD/RAR7hpN5qIZubZ XxUWA+pqRFu+FLtzt6O+GorAbfiEqgNAzU9ipMGfKYmNM28kpHV9/PtSdX3q+LMIPVCw 6Rn6s0MvQ+ZcNirvRHqo/wzM9xntEFYI4j7wd+Nop9QmwH+sINXoRyVswLvHUAeINBzm sdfT++cwWc3Q/pG2N8qIX1/5unnrmMMSieyimYD780DFv/5GajOgzL9+vrMEpCed1Qf6 55WA== 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=f/C+senbndULJWNdGhdDtynwSqspcIgbzLuXwF13ouQ=; b=shaJ1GdIh25T8mDW1izEG2iSrG0xfPM31bZS/h49KfV0wdhlgzwDOjJc0SXeFcjPuQ h+z6Km4Zd7VBg+mDm3rRz7VpY2zqhDhiCfY1W6wlZVTCC297jXtsgFGqtBFWk+loGW6+ R/Em2l3A7IowxzLZLNYjYvw0NlLa1RULDNCXEkL66/HDVke1VtlmaXoiMewr/kG9qOyX oCKGezDcHARQLOvYHNZL0VrivezKnC7KxaSDSLU5HtP1TnlzEpInqoGIN1TKZoF4q1iR zgKrB4RDzU1HqNkGx2quKgSsx9Dy3L/CKnB8nGIBIC53LJSGAuuaFwE+O65BEQ5uAb4k KsZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=R7P71SF9; 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 x3-v6si13746391pgo.542.2018.07.31.11.40.23; Tue, 31 Jul 2018 11:40:24 -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=R7P71SF9; 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 S1729785AbeGaUV6 (ORCPT <rfc822;ruslan.trofymenko@linaro.org> + 13 others); Tue, 31 Jul 2018 16:21:58 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:35252 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729645AbeGaUV6 (ORCPT <rfc822;stable@vger.kernel.org>); Tue, 31 Jul 2018 16:21:58 -0400 Received: by mail-pf1-f194.google.com with SMTP id p12-v6so1427466pfh.2 for <stable@vger.kernel.org>; Tue, 31 Jul 2018 11:40:22 -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=f/C+senbndULJWNdGhdDtynwSqspcIgbzLuXwF13ouQ=; b=R7P71SF9wfBgZhlB4aRQ6TatleVcGH3k4mRqDGsSAi/OSBWMS5ixD4QPOMgJInvOPv /NiuEfRu7trP6NfG+0cijcXues+1zWUuDtAn0bT/eMEQECKWsDb3QiDJXbqQikCmNSfR ym5Y2QvKgefWcjXrx4mdKKMsA8mzU20atWMaU= 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=f/C+senbndULJWNdGhdDtynwSqspcIgbzLuXwF13ouQ=; b=hkKKpmnFo4DQ7Ze61j2ipKyOo4tLV9Vu7Xi6Rila1ggNl8QgQ5lt6COljaI1iSTvJi 3m7OLOQA57VCjQIxgKVBtdsny4IYFzvbWJRpOsVLcy75xBe/sGjuGtytQGPOttf8ZeNK SczqAW3RwW1oLVc+qPsQasBfk7+BwcoEccYrMGL/I5T465wTocW0wECu5ho0STvpDRdL VxoUzLrqyoF6IDQezDQirK2SQ5ukMa3s1HCfP5JLF1+64iAHFLkJMKi22K6vpfDriPSb wASNKbZLavIA+XsXBizfpq1eEEsSJvf6erRJeowHpr6LSpmbY7q8Z4izikwJ2+gvmjwl 3uhg== X-Gm-Message-State: AOUpUlH3LZ6EGppzfGAP5LnKzIrraoAlAbuVm+O8cyFDUxMvUUXti+fB asFxKiW5bet67y4DreLGkGlr0Q== X-Received: by 2002:a63:fd06:: with SMTP id d6-v6mr21710066pgh.348.1533062421943; Tue, 31 Jul 2018 11:40:21 -0700 (PDT) Received: from localhost.localdomain ([106.51.18.123]) by smtp.gmail.com with ESMTPSA id d191-v6sm15467977pfg.172.2018.07.31.11.40.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 31 Jul 2018 11:40:20 -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.9.y 4/5] sch_netem: avoid null pointer deref on init failure Date: Wed, 1 Aug 2018 00:10:04 +0530 Message-Id: <1533062405-32524-5-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1533062405-32524-1-git-send-email-amit.pundir@linaro.org> References: <1533062405-32524-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_netem.c b/net/sched/sch_netem.c index e899d9eb76cb..3f87ddb1777d 100644 --- a/net/sched/sch_netem.c +++ b/net/sched/sch_netem.c @@ -937,11 +937,11 @@ static int netem_init(struct Qdisc *sch, struct nlattr *opt) struct netem_sched_data *q = qdisc_priv(sch); int ret; + qdisc_watchdog_init(&q->watchdog, sch); + if (!opt) return -EINVAL; - qdisc_watchdog_init(&q->watchdog, sch); - q->loss_model = CLG_RANDOM; ret = netem_change(sch, opt); if (ret)