diff options
author | Yunsheng Lin <linyunsheng@huawei.com> | 2019-04-15 16:48:39 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-01-27 16:50:39 +0300 |
commit | b260dc8993ceb0df1b70492d3050c2f9ede5e1b1 (patch) | |
tree | 0fd6446ee7b8ef763b3421100e893b0d6b5f6df9 /drivers/hwmon | |
parent | 80198980a2274409c8627e0e65b52dd51b5cf962 (diff) | |
download | linux-b260dc8993ceb0df1b70492d3050c2f9ede5e1b1.tar.xz |
net: hns3: fix for vport->bw_limit overflow problem
[ Upstream commit 2566f10676ba996b745e138f54f3e2f974311692 ]
When setting vport->bw_limit to hdev->tm_info.pg_info[0].bw_limit
in hclge_tm_vport_tc_info_update, vport->bw_limit can be as big as
HCLGE_ETHER_MAX_RATE (100000), which can not fit into u16 (65535).
So this patch fixes it by using u32 for vport->bw_limit.
Fixes: 848440544b41 ("net: hns3: Add support of TX Scheduler & Shaper to HNS3 driver")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/hwmon')
0 files changed, 0 insertions, 0 deletions