diff options
author | Yunsheng Lin <linyunsheng@huawei.com> | 2018-03-09 10:37:00 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-03-09 11:33:14 -0500 |
commit | ec77789032c0d5ab77c32abd762f5a8e65198e1b (patch) | |
tree | 628ce30330ce1d663037ccd7d6bc557ef47eddcb /tools/perf/scripts/python/export-to-postgresql.py | |
parent | f31c1ba6687ea00a4149d6557820e02470e1dcb8 (diff) |
net: hns3: fix for use-after-free when setting ring parameter
In hns3_set_ringparam, hns3_uninit_all_ring frees the
memory pointed by priv->ring_data[i].ring, and
hns3_change_all_ring_bd_num use that pointer without mallocing,
which will cause a use-after-free problem.
The patch fixes it by not freeing the memory in
hns3_uninit_all_ring, and uses hns3_put_ring_config to free it
when necessary.
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions