Message ID | 1535007041-31605-5-git-send-email-amit.pundir@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a2e:164a:0:0:0:0:0 with SMTP id 10-v6csp756951ljw; Wed, 22 Aug 2018 23:50:59 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwiW0WFYFST2rfcb0cQJ7bGHuhHC/Qft+zIZU9nqdY9RLjBepyJNmo51Hg+nv26JAXkGdE0 X-Received: by 2002:a63:5e45:: with SMTP id s66-v6mr54569771pgb.151.1535007059373; Wed, 22 Aug 2018 23:50:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535007059; cv=none; d=google.com; s=arc-20160816; b=QZ3n1E8md+froP9WUlL1MMAZ41C94IfTUt+ph8/IzoFFJ4El4lJcC41fo0XLEx6wtT U/neiC4lSf9ZfeD3+FkNJAhits2zo82RwfIn4sDTQ8lVMXR7Ov0umWro9uzg8TKDT2F7 nJCvaFLLRA++zmFCS2rPp0eH6WOLpYfetju9cagbWV7gpgnfDzibQb2Tf/wRm21hhUER 0/Hk9vSPFUD3vQdflcZ7iQ/ETP2fQtwI8B9psPUXI8juBcf/vnPYLRJBT1bdYEPRdlWV hkhJ22n5tb1uyjs73HI4RHETY7WYKjxue4Q/9wZZI0xJBWbqGTt0HlhJI/JLUMa3n8M+ Chkg== 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=PJ0PRGh82Tycc/XTmKVI+9oHKwJKo2pdWo60rvKkWY7hMVN5rN9YGlldg3RHz7X2/2 ZVaGmUbIvA8TJjnGV99j5IwSyR8+yxd9A4yd7st6cXKnbs58DDJRdrUR+8I2GTW2Zbrp AXMA1eM9K66E7IOPGkqEOGAQZxLqGquG8sowEYSAO9acKVURvfjnGNuGvyHUUsQigKt7 rUQwIWOUGgeahmq//ErOHlugHkMTzc4uPtVzYETqhC683AVEcI47c29jGmGJ5gZ9AG5S mpKIpZfdq7Ooz6+7/qrNYC3Ee+lD5Hd1co4mSFYhno3LraYHswxifNkh2/J99XGxMToc 0ESw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=F6EaWKmI; 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 cf13-v6si3685258plb.334.2018.08.22.23.50.59; Wed, 22 Aug 2018 23:50:59 -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=F6EaWKmI; 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 S1726182AbeHWKTH (ORCPT <rfc822;ruslan.trofymenko@linaro.org> + 13 others); Thu, 23 Aug 2018 06:19:07 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:40273 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726068AbeHWKTH (ORCPT <rfc822;stable@vger.kernel.org>); Thu, 23 Aug 2018 06:19:07 -0400 Received: by mail-pg1-f196.google.com with SMTP id z25-v6so2092367pgu.7 for <stable@vger.kernel.org>; Wed, 22 Aug 2018 23:50:58 -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=F6EaWKmIw7GtFSUjeoOjpcdVFyHnU211KWisIKQEgNkShovUHW8q4vJP8xrYBeFJ9t Slb0GLKbvpJ2uz2N3TsChevNY2qtwHWG/sv5GhoEzcO+kz11z7TMDxLJ13k5JJNkwY6s a8PRauuybCkJC+Fxi36lrXCTPLvZnJCN+QNNA= 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=DfBABhBO3GFX8INPxd89KGdxphQizjAWRtwoKvvPz8CqEJmUZoNUEAXpuw7l8a0MSA 6R4pe2+yOG23ofxNSCaYHUSOe0lumz6UrFihSbpC9y/O5PjdqYcSTK2q0AGwqa9+D9qB x0HzNEWvStYPvOL3RxS6ag687Aplezh8nj4jDKb1WDWUtP1E7uQuUf9PMG3NEDRM+eyY xfszEo5cIua3S5xNzh5Ezw1xQ1QKukLZ8Igepi/QDmd60/9L15P48iqMLv9oi620ggXb qjPwqvjdXOurOl8XK3Eqpp1rOXiNwCI7SY3R++pKYk9sUR3RgLCFXlwW3Ikm7v2mf/lf P6cg== X-Gm-Message-State: AOUpUlEabk4XeQxfypEJLrpH/SLvxV5v/e0SYEAbiaTZMPJCIKdqsnkf dRaIdULVuhmh+BkBDxOHtjAZzQ== X-Received: by 2002:a63:24c:: with SMTP id 73-v6mr55906516pgc.252.1535007057611; Wed, 22 Aug 2018 23:50:57 -0700 (PDT) Received: from localhost.localdomain ([49.207.48.21]) by smtp.gmail.com with ESMTPSA id l85-v6sm6274501pfk.34.2018.08.22.23.50.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 22 Aug 2018 23:50:56 -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 v2 for-4.9.y 4/5] sch_netem: avoid null pointer deref on init failure Date: Thu, 23 Aug 2018 12:20:40 +0530 Message-Id: <1535007041-31605-5-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1535007041-31605-1-git-send-email-amit.pundir@linaro.org> References: <1535007041-31605-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)