linux_dsm_epyc7002/drivers/net/ethernet/hisilicon
Jian Shen b4f1d30327 net: hns3: Fix tqp array traversal condition for vf
There are two tqp_num variables "hdev->tqp_num" and "kinfo->tqp_num"
used in VF. "hdev->tqp_num" is the total tqp number allocated to the
VF, and "kinfo->tqp_num" indicates the tqp number being used by the
VF. Usually the two variables are equal. But for the case hdev->tqp_num
larger than rss_size_max, and num_tc is 1, "kinfo->tqp_num" will be
less than "hdev->tqp_num".

In original codes, "hdev->tqp_num" is always used to traverse the
tqp array of kinfo. It may cause null pointer error when "hdev->tqp_num"
is larger than "kinfo->tqp_num"

Fixes: e2cb1dec97 ("net: hns3: Add HNS3 VF HCL(Hardware Compatibility Layer) Support")
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-21 19:29:32 -07:00
..
hns net: hns: make function hns_gmac_wait_fifo_clean() static 2018-09-17 08:07:04 -07:00
hns3 net: hns3: Fix tqp array traversal condition for vf 2018-09-21 19:29:32 -07:00
hip04_eth.c net: hns3: fix return type of ndo_start_xmit function 2018-09-18 20:01:25 -07:00
hisi_femac.c drivers: net: generalize napi_complete_done() 2017-01-30 15:10:42 -05:00
hix5hd2_gmac.c net: hns3: fix return type of ndo_start_xmit function 2018-09-18 20:01:25 -07:00
hns_mdio.c net: hns: Fix a wrong op phy C45 code 2017-07-08 11:05:21 +01:00
Kconfig net: hns3: give default option while dependency HNS3 set 2018-07-02 22:49:14 +09:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00