Message ID | 1533062586-804-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-v6csp5670749ljj; Tue, 31 Jul 2018 11:43:24 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeQOH51WJ7p/mAdE7/+s71beEsdQBID7boL1MTXvCiU0eQ9tGDlEZT+mO/rlb6IdeG9m6Qo X-Received: by 2002:a63:d401:: with SMTP id a1-v6mr21391079pgh.414.1533062604407; Tue, 31 Jul 2018 11:43:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533062604; cv=none; d=google.com; s=arc-20160816; b=JoAMSry+n1ifV6ayUxsx+b92rVxsh+CB+X0v0bzgloGsYAw6abdx+L5f96NOv70O5V +vJIXlXHXMCtxPFd+4m6MFbByP45FWTCPBE/aYUKXyimePh6JuDS4cVo+k0Dv/xq/obz aQbyiSdyms49OivbfPYVrAkPaceYoLY4QAm0g9XSQ5rghekBTulJ1ezNbJVuroyIILhd XJ+IQbQ29yuZwutrnkuUCxPCdfAhskaNyxYPhURza+TZsi1uR1DqkaxzK+Vyfk8KA0R4 g9Hxr+Re0WT4vtyvu9JBxedSeNFVkA91Y++Lqi2KOHU0mmC8Wx5JgVQxVKLicWSp5v5y m75g== 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=FO1OiUvUGFGRcngUcmdFC97SkgP7sAxZmmtjGPihLPA=; b=FgDLJlXNN36ZxYohLT8aZMufWMBzzECYsXclcOJ3vR3VyRxIxckHxxXwWnOSUXIS5G blzIXNnWGkjVNdt++3HAJMD4Q7bTQCZ5KpfJAiudNOiPJ5O8Q+LITIy4BRZIvarAm0Fm QvitOb66VGbHgTUhgkJyQ/n3EL79z0rFJNR4Zr4JjGg8i4/ZU4lQQe6jKupeJ22gLCnZ grM/s/uAqNcKfPZbhmWoHCByLUDJkSvsC2Ob1esR8QP7vtwRGuDDcaxwUyw+XmikdB05 SCNJZJpd99NVQiRkTQRHKFDo8r1NQNdmg1hLkbZ4891i5SaE3nC3FqP2XwodZjB4poex 72FA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BdKfcO0h; 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.24; Tue, 31 Jul 2018 11:43: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=BdKfcO0h; 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 S1729645AbeGaUY7 (ORCPT <rfc822;ruslan.trofymenko@linaro.org> + 13 others); Tue, 31 Jul 2018 16:24:59 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:39918 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729772AbeGaUY7 (ORCPT <rfc822;stable@vger.kernel.org>); Tue, 31 Jul 2018 16:24:59 -0400 Received: by mail-pg1-f194.google.com with SMTP id a11-v6so9519554pgw.6 for <stable@vger.kernel.org>; Tue, 31 Jul 2018 11:43: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=FO1OiUvUGFGRcngUcmdFC97SkgP7sAxZmmtjGPihLPA=; b=BdKfcO0hUU2y65b3NROPwGe13Aon9F+fQm52nz4tXOhaxJIyZknFnEwm5obkYo8R81 zQba2w89DLsccY4mcdEQeyvh7A7plBQu5wEf+I12WiBswru9ipl3lk129NFmNU1ZLClV 21HvEgVcrCn8XVMWE7R7vaRm4ZNCT0j6t6u60= 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=FO1OiUvUGFGRcngUcmdFC97SkgP7sAxZmmtjGPihLPA=; b=BQhimUPs6nfiufLm7no/IXufcJ43GDotIVY40YE1sedjypB5y6Jc6sVe4/B7MfLq8c t3aqTsS/1Y4VEv8gNbiKHLfBJN5YYb3Pgu4vDib2TBHfBIVNeJHJsnWo7KtKFY1mOlPC vVGTy6DThAKX1v3Xzh+UcdFn+vY/DfZfMzjTybi7ruTRZImKVuiSug/qtbe53/8R/NmR 6ebZfjXjPjTDXpUTlv3y3Ne0kPkn9kE3KARBbShSUqS9putBTLtEnv29E8cWpOtjQvVE 99DXXqhfq4zXOZU/46d3cpctZdiR61gb4HUycM8NmQYidlwe1uAU90timmTh1BQa8JCB wRdQ== X-Gm-Message-State: AOUpUlEl7IU/vTBGujPYMHFV4Jp1+YZUjETxkR81dxBQcwaBnOLXGYI0 MsfULOrfyRZ2k0Jot8aM2qdqZQ== X-Received: by 2002:a65:608b:: with SMTP id t11-v6mr21632031pgu.259.1533062601998; Tue, 31 Jul 2018 11:43:21 -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.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 31 Jul 2018 11:43: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.4.y 4/5] sch_netem: avoid null pointer deref on init failure Date: Wed, 1 Aug 2018 00:13:05 +0530 Message-Id: <1533062586-804-5-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_netem.c b/net/sched/sch_netem.c index b7c29d5b6f04..743ff23885da 100644 --- a/net/sched/sch_netem.c +++ b/net/sched/sch_netem.c @@ -943,11 +943,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)