aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/af_inet.c
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2008-02-29 14:14:50 -0500
committerDavid S. Miller <davem@davemloft.net>2008-02-29 14:14:50 -0500
commita5710d6582868a96cf0fe02eac11d34cfbc783c9 (patch)
tree8fcc3f4bc58436c1809602a98c9ce759c74f9410 /net/ipv4/af_inet.c
parent9b0f976f27f00a81cf47643d90854659626795b4 (diff)
[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>
Diffstat (limited to 'net/ipv4/af_inet.c')
-rw-r--r--net/ipv4/af_inet.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index a7a99ac856dc..4f539bd48718 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -1430,7 +1430,8 @@ static int __init inet_init(void)
1430 * Set the ICMP layer up 1430 * Set the ICMP layer up
1431 */ 1431 */
1432 1432
1433 icmp_init(); 1433 if (icmp_init() < 0)
1434 panic("Failed to create the ICMP control socket.\n");
1434 1435
1435 /* 1436 /*
1436 * Initialise the multicast router 1437 * Initialise the multicast router