summary refs log tree commit diff
path: root/net/sched/sch_sfb.c
diff options
context:
space:
mode:
authorVladimir Oltean <olteanv@gmail.com>2019-09-29 02:39:48 +0300
committerDavid S. Miller <davem@davemloft.net>2019-10-01 09:51:39 -0700
commit83c8c3cf45163f0c823db37be6ab04dfcf8ac751 (patch)
tree539bcbc710c0ab376da104a69db2a2f73093fbe6 /net/sched/sch_sfb.c
parent9a9251a3534745d08a92abfeca0ca467b912b5f6 (diff)
downloadlinux-83c8c3cf45163f0c823db37be6ab04dfcf8ac751.tar.gz
net: sched: cbs: Avoid division by zero when calculating the port rate
As explained in the "net: sched: taprio: Avoid division by zero on
invalid link speed" commit, it is legal for the ethtool API to return
zero as a link speed. So guard against it to ensure we don't perform a
division by zero in kernel.

Fixes: e0a7683d30e9 ("net/sched: cbs: fix port_rate miscalculation")
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_sfb.c')
0 files changed, 0 insertions, 0 deletions