Received: by 10.223.185.116 with SMTP id b49csp1138725wrg; Fri, 23 Feb 2018 12:37:11 -0800 (PST) X-Google-Smtp-Source: AH8x2270J13tuhl+cn44dx+qmFxTlOuhno3lo4DMgGP4ej8FCUkJj3WbpiFpMLx50Caax6aSEnKF X-Received: by 2002:a17:902:8349:: with SMTP id z9-v6mr2759598pln.163.1519418231673; Fri, 23 Feb 2018 12:37:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519418231; cv=none; d=google.com; s=arc-20160816; b=HmkCIgB35IRvF4ueLMy2w4fVD/6vSX+bKLzIfqH4Ng2+5moKX2qP6HlMyD+r43kszv dhHBTUtQ0ntc2JapXDmJadu4tQAiUtffdcaSq8XxfFwcXNLA0Al2S7Am2MT7Fht+b6BN fhsfbI5BrpxVVmGMxZDyKaH/tK3O6RloAS+9/1PkjrOm9dcV6sO5BIUyjZRN2kd0HsDj AmKoXMc2fxQqp7RN9mCqPnFkZINYQ2rd9sR6dvXS6gEGB/8fshRwG0vd44ryzyHYlMc0 spYiFsTMaXLW2NdFjEukKQgwYObFPTOve1rjqO1nZxvJv66WQjfoqtPazvgpja/3yP8f ONEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=FfvpNii41fTPEOG8WUURA38N1GKIQm3rzoefju1FNJg=; b=ndrcTHXUCYM2LvdEDX+SK6fCsptXx1hxHvoeVjPJnLgs4gQoaCINGGCBk+fzIRg+cf SXTMBBeLOx5W0GXg2/KHIZUd4KjNqmfdpJ+z4p52Wp6SrSyAT7a2OfNlM3UdkAO9TOB+ EaFyOnKnAVQSTV572Z3OCa3L3NoBya3R8GeA3xk8JPqfcwkM7nbByVKPNif8DtZcsGRy pXK+QCgoN4mx+ESIILrxUrd4QdW7QQ4oY6A8psqeUasoPsYm1lx8r+K7EOwupzCAbaXo 0WTgmHqmZzOqgChfd7m6RPn3xEv8eZET/qmiGu8zRheEdgrWKL8KMLAeo7ZjkSmcHkxV vPCA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z67si2333824pfb.223.2018.02.23.12.36.57; Fri, 23 Feb 2018 12:37:11 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753611AbeBWSen (ORCPT + 99 others); Fri, 23 Feb 2018 13:34:43 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:37034 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753569AbeBWSej (ORCPT ); Fri, 23 Feb 2018 13:34:39 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 34C4A1241; Fri, 23 Feb 2018 18:34:39 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nogah Frankel , "David S. Miller" , Sasha Levin Subject: [PATCH 4.4 046/193] net_sched: red: Avoid devision by zero Date: Fri, 23 Feb 2018 19:24:39 +0100 Message-Id: <20180223170333.192593572@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170325.997716448@linuxfoundation.org> References: <20180223170325.997716448@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Nogah Frankel [ Upstream commit 5c472203421ab4f928aa1ae9e1dbcfdd80324148 ] Do not allow delta value to be zero since it is used as a divisor. Fixes: 8af2a218de38 ("sch_red: Adaptative RED AQM") Signed-off-by: Nogah Frankel Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- include/net/red.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/include/net/red.h +++ b/include/net/red.h @@ -178,7 +178,7 @@ static inline void red_set_parms(struct p->qth_max = qth_max << Wlog; p->Wlog = Wlog; p->Plog = Plog; - if (delta < 0) + if (delta <= 0) delta = 1; p->qth_delta = delta; if (!max_P) {