diff options
author | Denis V. Lunev <den@openvz.org> | 2008-02-29 11:14:50 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-02-29 11:14:50 -0800 |
commit | a5710d6582868a96cf0fe02eac11d34cfbc783c9 (patch) | |
tree | 8fcc3f4bc58436c1809602a98c9ce759c74f9410 /net/ipv4/af_inet.c | |
parent | 9b0f976f27f00a81cf47643d90854659626795b4 (diff) | |
download | kernel_samsung_tuna-a5710d6582868a96cf0fe02eac11d34cfbc783c9.zip kernel_samsung_tuna-a5710d6582868a96cf0fe02eac11d34cfbc783c9.tar.gz kernel_samsung_tuna-a5710d6582868a96cf0fe02eac11d34cfbc783c9.tar.bz2 |
[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.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index a7a99ac..4f539bd 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c @@ -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 |