Wang Hai c96b6acc8f dccp: Fix possible memleak in dccp_init and dccp_fini
There are some memory leaks in dccp_init() and dccp_fini().

In dccp_fini() and the error handling path in dccp_init(), free lhash2
is missing. Add inet_hashinfo2_free_mod() to do it.

If inet_hashinfo2_init_mod() failed in dccp_init(),
percpu_counter_destroy() should be called to destroy dccp_orphan_count.
It need to goto out_free_percpu when inet_hashinfo2_init_mod() failed.

Fixes: c92c81df93df ("net: dccp: fix kernel crash on module load")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Hai <wanghai38@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-06-09 13:26:23 -07:00
..
2020-05-29 13:10:39 -07:00
2019-01-23 11:18:00 -08:00
2020-05-20 20:31:32 -04:00
2020-03-23 21:57:44 -07:00
2020-05-05 13:23:29 -07:00
2019-10-23 20:13:22 -07:00
2019-12-09 10:36:44 -08:00
2020-05-28 11:11:45 -07:00
2020-05-28 11:11:46 -07:00
2018-09-13 09:04:58 -07:00
2019-12-09 10:36:44 -08:00
2020-03-04 13:25:55 -08:00
2018-05-16 07:23:35 +02:00
2020-03-23 21:57:44 -07:00
2020-03-29 22:30:57 -07:00
2019-04-22 21:47:25 -07:00
2019-10-05 16:29:00 -07:00
2020-03-09 22:34:58 +01:00
2019-12-09 10:28:43 -08:00