[ICMP]: Add return code to icmp_init.
icmp_init could fail and this is normal for namespace other than initial. So, the panic should be triggered only on init_net initialization path. Additionally create rollback path for icmp_init as a separate function. It will also be used later during namespace destruction. Signed-off-by: Denis V. Lunev <den@openvz.org> Acked-by: Daniel Lezcano <dlezcano@fr.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
9b0f976f27
commit
a5710d6582
@@ -1430,7 +1430,8 @@ static int __init inet_init(void)
|
||||
* Set the ICMP layer up
|
||||
*/
|
||||
|
||||
icmp_init();
|
||||
if (icmp_init() < 0)
|
||||
panic("Failed to create the ICMP control socket.\n");
|
||||
|
||||
/*
|
||||
* Initialise the multicast router
|
||||
|
Reference in New Issue
Block a user