]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
net: hns3: check queue id range before using
authorYufeng Mo <moyufeng@huawei.com>
Wed, 15 Sep 2021 13:52:09 +0000 (21:52 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 Sep 2021 12:28:39 +0000 (13:28 +0100)
commit63b1279d9905100a14da9e043de7b28e99dba3f8
treefcf875c6ecbe9da170937d3fb51b31c573f12ca8
parent311c0aaa9b4bb8dc65f22634e15963316b17c921
net: hns3: check queue id range before using

The input parameters may not be reliable. Before using the
queue id, we should check this parameter. Otherwise, memory
overwriting may occur.

Fixes: d34100184685 ("net: hns3: refactor the mailbox message between PF and VF")
Signed-off-by: Yufeng Mo <moyufeng@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c