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:05:48 +0000 (11:05 +0100)
commita0514c0ba76a5a941ed3b8efa7a952273c1ca421
tree93cad8c05c587fca9fe4e94aedbef0bebe0428f0
parent1c03903e973c276f9e75d6f7f3727b51b97c803b
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@microsoft.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