Message ID | 1535007116-31801-5-git-send-email-amit.pundir@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a2e:164a:0:0:0:0:0 with SMTP id 10-v6csp757692ljw; Wed, 22 Aug 2018 23:52:13 -0700 (PDT) X-Google-Smtp-Source: AA+uWPyfMg0Xgc+xpgOoVaERV721g+0a2T61O1HXH0C9ggZ4dCG0HrysVRqgWVp3Dj7J6WBFLgIH X-Received: by 2002:a63:7d48:: with SMTP id m8-v6mr55146948pgn.0.1535007133371; Wed, 22 Aug 2018 23:52:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535007133; cv=none; d=google.com; s=arc-20160816; b=rZIu969JGZmfu5BN3SG440erelN1Q29Ok8JMpJnFsj5B5XRIw8yJ+B04Nbviy6PXtA LbnkoqzlONEB+v2NWxjx7O6gtV1GZQ8NzCseNiXBMLVAxdMEUrsbL6q9YkWzTKiy8i5L Ot1+TTgAlfDoEsZ7wMhvrMDt1AsLfPdTrhnPjQMc2J+X5cVMxJU7p8aQD/8SDrOfY5WG Wd2AO8yvLCRlVQvSUhZfXBHUP/sq7kduMZ3CuWqhy+LOJNVSXnX5WOWcJgeypTFski25 /qZGTtOcEbq9924jFJcywYfpHXXHq93NNUdRz8WiNlYI/L4dC3ygud6W2Zn3cg0qR3Re OJgw== 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=oLJgrOD7nh4IdnTX7kkuo7o/YND5QgKd46eOFF0x4Equjmqo+BKY+yD27bv4aFSK+6 tzoYpA5bIhavX06sWIUXEsLwFfW7qWjZXvIVDnCJlA9ihI9RYuh0KacQ8aMr47EIPOFr 1een8cXJnJywMkypQw+yD/njS2GUW7rEn1zlivNhLL+NsByPrr0rnLQvXvZ0KOVHR9PM nmzqODutMUEsu6X1jGInHlV1yjHH4D7W4W3TzHNhwDIAXLKnAAtx9S3eClKE2VmP490s g+xjjzB8g85UAmC1b/cUqtjkxAofQdblhQyd4JpuTKznfC+zBPtv/BxNeyn7Ie7Jalch qEgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ot1YAxXs; 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.52.13; Wed, 22 Aug 2018 23:52:13 -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=Ot1YAxXs; 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 S1726274AbeHWKUV (ORCPT <rfc822;ruslan.trofymenko@linaro.org> + 13 others); Thu, 23 Aug 2018 06:20:21 -0400 Received: from mail-pl0-f66.google.com ([209.85.160.66]:34482 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726068AbeHWKUV (ORCPT <rfc822;stable@vger.kernel.org>); Thu, 23 Aug 2018 06:20:21 -0400 Received: by mail-pl0-f66.google.com with SMTP id f6-v6so1980302plo.1 for <stable@vger.kernel.org>; Wed, 22 Aug 2018 23:52:12 -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=Ot1YAxXsR1RcIN39+oC2yHoNAJpUdWu5kdYjO+jfimB+Cuzv3VYB9Idwf82MKizHVE qReYwvTnjbWgaJM9FlltIxM0lpXXYB4dmBFuSg9y4SUt1PNbEn8kFZ72lbpx6NJE/S/7 Uzv6bBb/MeH68PNOrSUNUOi/ftSYFVsSSKUXs= 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=QVwrv+wsllqzI97P2FtlWDCqHIWFexOluT2gJM1ZgHiQAWCRDKFGxmAHcZ3ApIRih8 vcIas12Tu5uqdW61aechPmRBAFG+so8DkaAOgUqObqGOdWhnYTEZUyi2w63kpbyTxSSm yhorXmDYdDT41L+CYEErFIvjWQFLBtKF/6ApvrKPNOSVbiSN7UT7YYjnohmMiAjCbkDR yRVp5ywcHLNfw9YeSTJTOPNakn8ZvjQN93OQ2n+BAcJ/Dg5pkd3sKoynB2eC7K00OxQJ CME040W89DhaB2pkz2Mkuw7wbRPweKL/9UqmLsFqiE1qXm4oknRRLrSXk/3L8v2OmYl1 GEWw== X-Gm-Message-State: AOUpUlEqXt37L5wWpLUp382aEpfSvo92lqNW4LAV+D/Qd7DilvFT13eY 0tpEBo9gtCFUlZId8+JuLEoz433FDMY= X-Received: by 2002:a17:902:7009:: with SMTP id y9-v6mr57401920plk.249.1535007131816; Wed, 22 Aug 2018 23:52:11 -0700 (PDT) Received: from localhost.localdomain ([49.207.48.21]) by smtp.gmail.com with ESMTPSA id d132-v6sm7559932pgc.93.2018.08.22.23.52.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 22 Aug 2018 23:52:10 -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.4.y 4/5] sch_netem: avoid null pointer deref on init failure Date: Thu, 23 Aug 2018 12:21:55 +0530 Message-Id: <1535007116-31801-5-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1535007116-31801-1-git-send-email-amit.pundir@linaro.org> References: <1535007116-31801-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)