summaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorDaniil Tatianin <d-tatianin@yandex-team.ru>2023-03-09 23:15:56 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-03-22 13:26:13 +0100
commitc7badc945938985e3e7036b769c22c76d5f6bc3c (patch)
treec318b5989ca76693a074fd0f4aa4b65b684a2a17 /net/ipv6
parent2bd1ed6d607d7013ed4959e86990a04f028543ef (diff)
downloadlinux-stable-c7badc945938985e3e7036b769c22c76d5f6bc3c.tar.gz
linux-stable-c7badc945938985e3e7036b769c22c76d5f6bc3c.tar.bz2
linux-stable-c7badc945938985e3e7036b769c22c76d5f6bc3c.zip
qed/qed_dev: guard against a possible division by zero
[ Upstream commit 1a9dc5610ef89d807acdcfbff93a558f341a44da ] Previously we would divide total_left_rate by zero if num_vports happened to be 1 because non_requested_count is calculated as num_vports - req_count. Guard against this by validating num_vports at the beginning and returning an error otherwise. Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. Fixes: bcd197c81f63 ("qed: Add vport WFQ configuration APIs") Signed-off-by: Daniil Tatianin <d-tatianin@yandex-team.ru> Reviewed-by: Simon Horman <simon.horman@corigine.com> Link: https://lore.kernel.org/r/20230309201556.191392-1-d-tatianin@yandex-team.ru Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/ipv6')
0 files changed, 0 insertions, 0 deletions