Home
last modified time | relevance | path

Searched hist:"472430 a7" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/net/ethernet/hisilicon/hns3/hns3pf/
H A Dhclge_debugfs.c472430a7 Mon Sep 13 08:08:24 CDT 2021 Jiaran Zhang <zhangjiaran@huawei.com> net: hns3: fix the exception when query imp info

When the command for querying imp info is issued to the firmware,
if the firmware does not support the command, the returned value
of bd num is 0.
Add protection mechanism before alloc memory to prevent apply for
0-length memory.

Fixes: 0b198b0d80ea ("net: hns3: refactor dump m7 info of debugfs")
Signed-off-by: Jiaran Zhang <zhangjiaran@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>