commit | 987b4ae78e4268d22b279f65d80cc541f9f0eb53 | [log] [tgz] |
---|---|---|
author | Weihang Li <liweihang@hisilicon.com> | Thu Jun 20 16:52:42 2019 +0800 |
committer | David S. Miller <davem@davemloft.net> | Wed Jun 26 11:59:02 2019 -0400 |
tree | e1c46571849deb539f19d186264d1638678c7e3a | |
parent | 9d5e67d1c191831da79f0a8bcff029151e3fe54b [diff] |
net: hns3: add check to number of buffer descriptors This patch adds check to number of bds before we allocate memory for them. If we get an invalid bd num in some cases, it will cause a memory overflow. Signed-off-by: Weihang Li <liweihang@hisilicon.com> Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>