commit | 892951524647d593d9f5e540a56fef4e52b95c03 | [log] [tgz] |
---|---|---|
author | Peng Li <lipeng321@huawei.com> | Thu Jul 04 22:04:28 2019 +0800 |
committer | David S. Miller <davem@davemloft.net> | Fri Jul 05 15:39:38 2019 -0700 |
tree | c49b0b72c33729b4e41f42528f7e16c83461366e | |
parent | b9a8f88373c586e357c8c203b657407437040e40 [diff] |
net: hns3: set maximum length to resp_data_len for exceptional case If HCLGE_MBX_MAX_RESP_DATA_SIZE > HCLGE_MBX_MAX_RESP_DATA_SIZE, the memcpy will cause out of memory. So this patch just set resp_data_len to the maximum length for this case. Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>