]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit8cefbf22b37b004a354a2859904691eaed276dbd
tree4601c96330ca1e61d0b6deedd35224abd1f13ce2
parent3684d75733f395ff8da645fe89752e6afe1cde1e
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: c3beee90d6ab ("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