diff options
author | Vladimir Oltean <olteanv@gmail.com> | 2019-09-29 02:39:48 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-01-27 16:51:16 +0300 |
commit | 172c529cb00acc367426a3aab72ceb8d3c742ca5 (patch) | |
tree | ce58186034c15895befb763331186e8e87c218b1 /drivers/nvme | |
parent | 13260106d33a5d23c731f240eb56b799102ab286 (diff) | |
download | linux-172c529cb00acc367426a3aab72ceb8d3c742ca5.tar.xz |
net: sched: cbs: Avoid division by zero when calculating the port rate
[ Upstream commit 83c8c3cf45163f0c823db37be6ab04dfcf8ac751 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/nvme')
0 files changed, 0 insertions, 0 deletions