Yunsheng Lin ec77789032 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>
2018-03-09 11:33:14 -05:00
..
2018-02-06 09:59:40 -08:00
2018-02-15 14:50:32 -08:00
2018-03-01 08:41:27 -07:00
2018-02-07 11:22:44 -08:00
2018-03-02 10:44:44 +01:00
2018-02-02 10:01:04 -08:00
2018-02-26 09:28:35 -08:00
2018-03-02 09:35:36 -08:00
2018-02-24 16:05:50 -08:00
2018-02-01 10:31:17 -08:00
2018-03-02 17:44:39 -08:00
2018-02-20 11:34:54 +00:00
2018-02-01 09:40:49 -08:00
2018-02-05 10:07:40 -08:00
2018-02-06 09:59:40 -08:00
2018-02-22 12:13:01 -08:00
2018-03-02 10:19:57 -08:00
2018-02-01 10:31:17 -08:00
2018-02-06 09:59:40 -08:00