]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
net: hns3: Fixes the out of bounds access in hclge_map_tqp
authorHuazhong Tan <tanhuazhong@huawei.com>
Tue, 1 May 2018 18:55:59 +0000 (19:55 +0100)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 6 Jun 2018 18:40:47 +0000 (14:40 -0400)
commitb76edfb2f8d292e066d75fcbcff3e4cf12e1232d
tree3f5c786a4965f2099c96f4303dc73e386c966555
parentc82a5497271993ccb9f0b089508986fe162d299d
net: hns3: Fixes the out of bounds access in hclge_map_tqp

BugLink: https://bugs.launchpad.net/bugs/1768670
This patch fixes the handling of the check when number of vports
are detected to be more than available TPQs. Current handling causes
an out of bounds access in hclge_map_tqp().

Fixes: 7df7dad633e2 ("net: hns3: Refactor the mapping of tqp to vport")
Signed-off-by: Huazhong Tan <tanhuazhong@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>
(cherry picked from commit 38e62046d4c95272e2fb001d2d72baf48fa090e9 linux-next)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c