net_sched: red: Avoid illegal values
authorNogah Frankel <nogahf@mellanox.com>
Mon, 4 Dec 2017 11:31:11 +0000 (13:31 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Feb 2018 10:07:59 +0000 (11:07 +0100)
commit8001a37b83c4b716936a40ab451b75d9f43d0c6b
tree2c2a24d1bc702f9e2c6615b7614eb3ee9f855cd4
parente428e8ce3a008852e56e25c2fab4bc14c9f16915
net_sched: red: Avoid illegal values

[ Upstream commit 8afa10cbe281b10371fee5a87ab266e48d71a7f9 ]

Check the qmin & qmax values doesn't overflow for the given Wlog value.
Check that qmin <= qmax.

Fixes: a783474591f2 ("[PKT_SCHED]: Generic RED layer")
Signed-off-by: Nogah Frankel <nogahf@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/net/red.h
net/sched/sch_choke.c
net/sched/sch_gred.c
net/sched/sch_red.c
net/sched/sch_sfq.c