net: hns3: add validity check for message data length
authorJian Shen <shenjian15@huawei.com>
Sun, 24 Apr 2022 12:57:24 +0000 (20:57 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Apr 2022 09:48:49 +0000 (10:48 +0100)
commit7d413735cb18ff73aaba3457b16b08332e8d3cc4
tree4601c96330ca1e61d0b6deedd35224abd1f13ce2
parent48009e9972974c52a5f649f761862dd67bce3d13
net: hns3: add validity check for message data length

Add validity check for message data length in function
hclge_send_mbx_msg(), avoid unexpected overflow.

Fixes: dde1a86e93ca ("net: hns3: Add mailbox support to PF driver")
Signed-off-by: Jian Shen <shenjian15@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