]> git.baikalelectronics.ru Git - kernel.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)
commitb5d16b26a57fad837b6f1cea5ce3efe385773032
treefcf875c6ecbe9da170937d3fb51b31c573f12ca8
parent070af49b60ce61d7d934063d646a0109f1b838b9
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: 66f95ea3ecc3 ("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