]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: add a check for queue_id in hclge_reset_vf_queue()
authorYufeng Mo <moyufeng@huawei.com>
Tue, 9 Feb 2021 09:03:05 +0000 (17:03 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 9 Feb 2021 23:20:43 +0000 (15:20 -0800)
commit5ad8d8ee4bc3140fe416f245d4169ffe38320b3a
tree932d1e7399d5b3dc7199c95c3b4b5a36a0620d53
parent39b516a6cad172260d8da32d5ce644a4cf3a2b1b
net: hns3: add a check for queue_id in hclge_reset_vf_queue()

The queue_id is received from vf, if use it directly,
an out-of-bound issue may be caused, so add a check for
this queue_id before using it in hclge_reset_vf_queue().

Fixes: 3e43705295b9 ("net: hns3: fix the VF queue reset flow error")
Signed-off-by: Yufeng Mo <moyufeng@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c